base-4.20.0.0: Core data structures and operations
Copyright(c) Adam Gundry 2015-2016
Licensesee libraries/base/LICENSE
Maintainerghc-devs@haskell.org
Stabilityinternal
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

GHC.OverloadedLabels

Description

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

When OverloadedLabels is enabled, if GHC sees an occurrence of the overloaded label syntax #foo, it is replaced with

fromLabel @"foo" :: alpha

plus a wanted constraint IsLabel "foo" alpha.

Note that if RebindableSyntax is enabled, the desugaring of overloaded label syntax will make use of whatever fromLabel is in scope.

Documentation

class IsLabel (x :: Symbol) a where Source #

Methods

fromLabel :: a Source #