module Data.Apiary.Compat
(
Symbol, KnownSymbol, symbolVal
, SProxy(..)
, module Data.Typeable
#if !MIN_VERSION_base(4,7,0)
, typeRep
, Proxy(..)
#endif
) where
import GHC.TypeLits
import Data.Typeable
#if !MIN_VERSION_base(4,7,0)
typeRep :: forall proxy a. Typeable a => proxy a -> TypeRep
typeRep _ = typeOf (undefined :: a)
type KnownSymbol (n :: Symbol) = SingRep n String
symbolVal :: forall n proxy. KnownSymbol n => proxy n -> String
symbolVal _ = fromSing (sing :: Sing n)
data Proxy (a :: k) = Proxy
#endif
data SProxy (a :: Symbol) = SProxy