overloaded-records-0.3.0.0: Overloaded Records based on current GHC proposal.

Copyright(c) 2016, Peter Trško
LicenseBSD3
Maintainerpeter.trsko@gmail.com
Stabilityexperimental
PortabilityNoImplicitPrelude
Safe HaskellNone
LanguageHaskell2010

Data.OverloadedLabels

Contents

Description

This module defines the IsLabel class is used by the OverloadedLabels extension. See the wiki page for more details.

The key idea is that when GHC sees an occurrence of the new overloaded label syntax #foo, it is replaced with

fromLabel (proxy# :: Proxy# "foo") :: alpha

plus a wanted constraint IsLabel "foo" alpha.

Synopsis

Oveloaded Labels

class IsLabel l a where Source

Methods

fromLabel :: Proxy# l -> a Source

Instances

(SetField l s b, (~) * (UpdateType l s b) t) => IsLabel l (Setter s t b) Source