module Data.Generics.Labels
() where
import Data.Generics.Product
import GHC.OverloadedLabels
#if MIN_VERSION_generic_lens(0,5,0)
#if (__GLASGOW_HASKELL__ < 802)
instance (HasField x s t a b, Functor f, lens ~ ((a -> f b) -> s -> f t)) =>
IsLabel x lens where
fromLabel _ = field @ x
#else
instance (HasField x s t a b, Functor f, lens ~ ((a -> f b) -> s -> f t)) =>
IsLabel x lens where
fromLabel = field @ x
#endif
#elif (__GLASGOW_HASKELL__ < 802)
instance (HasField x a s, Functor f, lens ~ ((a -> f a) -> s -> f s)) =>
IsLabel x lens where
fromLabel _ = field @ x
#else
instance (HasField x a s, Functor f, lens ~ ((a -> f a) -> s -> f s)) =>
IsLabel x lens where
fromLabel = field @ x
#endif