13 lines
318 B
Haskell
13 lines
318 B
Haskell
|
{-# OPTIONS_GHC -Wno-orphans #-}
|
||
|
{-# LANGUAGE
|
||
|
FlexibleInstances, InstanceSigs, MultiParamTypeClasses, ScopedTypeVariables,
|
||
|
TypeApplications
|
||
|
#-}
|
||
|
module Records (HasField (..)) where
|
||
|
|
||
|
import GHC.Records
|
||
|
import GHC.OverloadedLabels
|
||
|
|
||
|
instance HasField x r a => IsLabel x (r -> a) where
|
||
|
fromLabel = getField @x
|