overloaded-records-0.4.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.TH

Description

Derive instances of IsLabel magic class for OverloadedLabels.

If you are using GHC, then you should use OverloadedLabels language extension and not this module.

Synopsis

Documentation

label :: String -> DecsQ Source

Define overloaded label:

<label-name> :: IsLabel "<label-name>" a => a
<label-name> = fromLabel (proxy# :: Proxy# "<label-name>")

labelNoSig :: String -> DecsQ Source

Define overloaded label, but without a type signature:

<label-name> = fromLabel (proxy# :: Proxy# "<label-name>")

labels :: [String] -> DecsQ Source

Same as label, but defines multiple overloaded labels at once.

labelsNoSig :: [String] -> DecsQ Source

Same as labelsNoSig, but defines multiple overloaded labels at once.