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
- STBls12381Fr :: SingT 'TBls12381Fr
- STBls12381G1 :: SingT 'TBls12381G1
- STBls12381G2 :: SingT 'TBls12381G2
- STTimestamp :: SingT 'TTimestamp
- STAddress :: SingT 'TAddress
- STNever :: SingT 'TNever
- 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.
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 # |