Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data DefaultUni a where
- DefaultUniInteger :: DefaultUni (Esc Integer)
- DefaultUniByteString :: DefaultUni (Esc ByteString)
- DefaultUniString :: DefaultUni (Esc Text)
- DefaultUniUnit :: DefaultUni (Esc ())
- DefaultUniBool :: DefaultUni (Esc Bool)
- DefaultUniProtoList :: DefaultUni (Esc [])
- DefaultUniProtoPair :: DefaultUni (Esc (,))
- DefaultUniApply :: !(DefaultUni (Esc f)) -> !(DefaultUni (Esc a)) -> DefaultUni (Esc (f a))
- DefaultUniData :: DefaultUni (Esc Data)
- pattern DefaultUniList :: forall a k1 k2 (f :: k1 -> k2) (a1 :: k1). () => forall. (a ~ Esc (f a1), Esc f ~ Esc []) => DefaultUni (Esc a1) -> DefaultUni a
- pattern DefaultUniPair :: forall a k1 k2 (f1 :: k1 -> k2) (a1 :: k1) k3 k4 (f2 :: k3 -> k4) (a2 :: k3). () => forall. (a ~ Esc (f1 a1), Esc f1 ~ Esc (f2 a2), Esc f2 ~ Esc (,)) => DefaultUni (Esc a2) -> DefaultUni (Esc a1) -> DefaultUni a
- module Universe
- data DefaultFun
- = AddInteger
- | SubtractInteger
- | MultiplyInteger
- | DivideInteger
- | QuotientInteger
- | RemainderInteger
- | ModInteger
- | EqualsInteger
- | LessThanInteger
- | LessThanEqualsInteger
- | AppendByteString
- | ConsByteString
- | SliceByteString
- | LengthOfByteString
- | IndexByteString
- | EqualsByteString
- | LessThanByteString
- | LessThanEqualsByteString
- | Sha2_256
- | Sha3_256
- | Blake2b_256
- | VerifyEd25519Signature
- | VerifyEcdsaSecp256k1Signature
- | VerifySchnorrSecp256k1Signature
- | AppendString
- | EqualsString
- | EncodeUtf8
- | DecodeUtf8
- | IfThenElse
- | ChooseUnit
- | Trace
- | FstPair
- | SndPair
- | ChooseList
- | MkCons
- | HeadList
- | TailList
- | NullList
- | ChooseData
- | ConstrData
- | MapData
- | ListData
- | IData
- | BData
- | UnConstrData
- | UnMapData
- | UnListData
- | UnIData
- | UnBData
- | EqualsData
- | SerialiseData
- | MkPairData
- | MkNilData
- | MkNilPairData
- nonZeroArg :: (Integer -> Integer -> Integer) -> Integer -> Integer -> EvaluationResult Integer
- builtinTagWidth :: NumBits
- encodeBuiltin :: Word8 -> Encoding
- decodeBuiltin :: Get Word8
Documentation
data DefaultUni a where Source #
The universe used by default.
DefaultUniInteger :: DefaultUni (Esc Integer) | |
DefaultUniByteString :: DefaultUni (Esc ByteString) | |
DefaultUniString :: DefaultUni (Esc Text) | |
DefaultUniUnit :: DefaultUni (Esc ()) | |
DefaultUniBool :: DefaultUni (Esc Bool) | |
DefaultUniProtoList :: DefaultUni (Esc []) | |
DefaultUniProtoPair :: DefaultUni (Esc (,)) | |
DefaultUniApply :: !(DefaultUni (Esc f)) -> !(DefaultUni (Esc a)) -> DefaultUni (Esc (f a)) | |
DefaultUniData :: DefaultUni (Esc Data) |
Instances
pattern DefaultUniList :: forall a k1 k2 (f :: k1 -> k2) (a1 :: k1). () => forall. (a ~ Esc (f a1), Esc f ~ Esc []) => DefaultUni (Esc a1) -> DefaultUni a Source #
pattern DefaultUniPair :: forall a k1 k2 (f1 :: k1 -> k2) (a1 :: k1) k3 k4 (f2 :: k3 -> k4) (a2 :: k3). () => forall. (a ~ Esc (f1 a1), Esc f1 ~ Esc (f2 a2), Esc f2 ~ Esc (,)) => DefaultUni (Esc a2) -> DefaultUni (Esc a1) -> DefaultUni a Source #
module Universe
data DefaultFun Source #
Default built-in functions.
When updating these, make sure to add them to the protocol version listing! See Note [New builtins and protocol versions]
Instances
nonZeroArg :: (Integer -> Integer -> Integer) -> Integer -> Integer -> EvaluationResult Integer Source #
Turn a function into another function that returns EvaluationFailure
when its second argument
is 0 or calls the original function otherwise and wraps the result in EvaluationSuccess
.
Useful for correctly handling div
, mod
, etc.
builtinTagWidth :: NumBits Source #
Using 7 bits to encode builtin tags.
encodeBuiltin :: Word8 -> Encoding Source #
decodeBuiltin :: Get Word8 Source #