gallery/make-pages/Records.hs

13 lines
318 B
Haskell
Raw Normal View History

2020-07-13 02:33:27 -04:00
{-# 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