module Ivory.Language.Proxy where
import GHC.TypeLits (natVal, symbolVal, Symbol, Nat, KnownNat, KnownSymbol)
data Proxy (a :: k) = Proxy
type SProxy a = Proxy (a :: *)
type ANat n = (KnownNat n)
type NatType n = Proxy n
aNat :: KnownNat n => Proxy n
aNat = Proxy
type ASymbol s = (KnownSymbol s)
type SymbolType s = Proxy s
aSymbol :: KnownSymbol s => Proxy s
aSymbol = Proxy
fromTypeSym :: KnownSymbol sym => proxy (sym :: Symbol) -> String
fromTypeSym = symbolVal
fromTypeNat :: KnownNat i => proxy (i :: Nat) -> Integer
fromTypeNat = natVal