Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module, providing singleton boilerplate for
T
data types.
Some functions from Data.Singletons are provided alternative version here.
Some instances which are usually generated with TH are manually implemented
as they require some specific constraints, namely Typeable
and/or
Converge
, not provided in instances generated by TH.
Synopsis
- data SingT :: T -> Type where
- STKey :: SingT 'TKey
- STUnit :: SingT 'TUnit
- STSignature :: SingT 'TSignature
- STChainId :: SingT 'TChainId
- STOption :: KnownT a => Sing a -> SingT ('TOption a)
- STList :: KnownT a => Sing a -> SingT ('TList a)
- STSet :: KnownT a => Sing a -> SingT ('TSet a)
- STOperation :: SingT 'TOperation
- STContract :: KnownT a => Sing a -> SingT ('TContract a)
- STPair :: (KnownT a, KnownT b) => Sing a -> Sing b -> SingT ('TPair a b)
- STOr :: (KnownT a, KnownT b) => Sing a -> Sing b -> SingT ('TOr a b)
- STLambda :: (KnownT a, KnownT b) => Sing a -> Sing b -> SingT ('TLambda a b)
- STMap :: (KnownT a, KnownT b) => Sing a -> Sing b -> SingT ('TMap a b)
- STBigMap :: (KnownT a, KnownT b) => Sing a -> Sing b -> SingT ('TBigMap a b)
- STInt :: SingT 'TInt
- STNat :: SingT 'TNat
- STString :: SingT 'TString
- STBytes :: SingT 'TBytes
- STMutez :: SingT 'TMutez
- STBool :: SingT 'TBool
- STKeyHash :: SingT 'TKeyHash
- STTimestamp :: SingT 'TTimestamp
- STAddress :: SingT 'TAddress
- class (Typeable t, SingI t) => KnownT (t :: T)
- withSomeSingT :: T -> (forall (a :: T). KnownT a => Sing a -> r) -> r
- fromSingT :: Sing (a :: T) -> T
Documentation
data SingT :: T -> Type where Source #
Instance of data family Sing
for T
.
Custom instance is implemented in order to inject Typeable
constraint for some of constructors.
STKey :: SingT 'TKey | |
STUnit :: SingT 'TUnit | |
STSignature :: SingT 'TSignature | |
STChainId :: SingT 'TChainId | |
STOption :: KnownT a => Sing a -> SingT ('TOption a) | |
STList :: KnownT a => Sing a -> SingT ('TList a) | |
STSet :: KnownT a => Sing a -> SingT ('TSet a) | |
STOperation :: SingT 'TOperation | |
STContract :: KnownT a => Sing a -> SingT ('TContract a) | |
STPair :: (KnownT a, KnownT b) => Sing a -> Sing b -> SingT ('TPair a b) | |
STOr :: (KnownT a, KnownT b) => Sing a -> Sing b -> SingT ('TOr a b) | |
STLambda :: (KnownT a, KnownT b) => Sing a -> Sing b -> SingT ('TLambda a b) | |
STMap :: (KnownT a, KnownT b) => Sing a -> Sing b -> SingT ('TMap a b) | |
STBigMap :: (KnownT a, KnownT b) => Sing a -> Sing b -> SingT ('TBigMap a b) | |
STInt :: SingT 'TInt | |
STNat :: SingT 'TNat | |
STString :: SingT 'TString | |
STBytes :: SingT 'TBytes | |
STMutez :: SingT 'TMutez | |
STBool :: SingT 'TBool | |
STKeyHash :: SingT 'TKeyHash | |
STTimestamp :: SingT 'TTimestamp | |
STAddress :: SingT 'TAddress |
class (Typeable t, SingI t) => KnownT (t :: T) Source #
Instances
(Typeable t, SingI t) => KnownT t Source # | |
Defined in Michelson.Typed.Sing | |
KnownT t => CheckScope (StorageScope t) Source # | |
Defined in Michelson.Typed.Scope checkScope :: Either BadTypeForScope (Dict (StorageScope t)) Source # | |
KnownT t => CheckScope (ParameterScope t) Source # | |
Defined in Michelson.Typed.Scope checkScope :: Either BadTypeForScope (Dict (ParameterScope t)) Source # | |
KnownT t => CheckScope (ComparabilityScope t) Source # | |
Defined in Michelson.Typed.Value checkScope :: Either BadTypeForScope (Dict (ComparabilityScope t)) Source # |
Orphan instances
SingKind T Source # | |
SingI 'TKey Source # | |
SingI 'TUnit Source # | |
SingI 'TSignature Source # | |
sing :: Sing 'TSignature # | |
SingI 'TChainId Source # | |
SingI 'TOperation Source # | |
sing :: Sing 'TOperation # | |
SingI 'TInt Source # | |
SingI 'TNat Source # | |
SingI 'TString Source # | |
SingI 'TBytes Source # | |
SingI 'TMutez Source # | |
SingI 'TBool Source # | |
SingI 'TKeyHash Source # | |
SingI 'TTimestamp Source # | |
sing :: Sing 'TTimestamp # | |
SingI 'TAddress Source # | |
KnownT a => SingI ('TOption a :: T) Source # | |
KnownT a => SingI ('TList a :: T) Source # | |
KnownT a => SingI ('TSet a :: T) Source # | |
KnownT a => SingI ('TContract a :: T) Source # | |
(KnownT a, KnownT b) => SingI ('TPair a b :: T) Source # | |
(KnownT a, KnownT b) => SingI ('TOr a b :: T) Source # | |
(KnownT a, KnownT b) => SingI ('TLambda a b :: T) Source # | |
(KnownT a, KnownT b) => SingI ('TMap a b :: T) Source # | |
(KnownT a, KnownT b) => SingI ('TBigMap a b :: T) Source # | |