Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module, containing CValue data type which represents Michelson comparable values.
Synopsis
- data CValue t where
- CvInt :: Integer -> CValue CInt
- CvNat :: Natural -> CValue CNat
- CvString :: MText -> CValue CString
- CvBytes :: ByteString -> CValue CBytes
- CvMutez :: Mutez -> CValue CMutez
- CvBool :: Bool -> CValue CBool
- CvKeyHash :: KeyHash -> CValue CKeyHash
- CvTimestamp :: Timestamp -> CValue CTimestamp
- CvAddress :: Address -> CValue CAddress
Documentation
Representation of comparable value in Michelson language.
By specification, we're allowed to compare only following types: int, nat, string, bytes, mutez, bool, key_hash, timestamp, address.
Only these values can be used as map keys or set elements.
CvInt :: Integer -> CValue CInt | |
CvNat :: Natural -> CValue CNat | |
CvString :: MText -> CValue CString | |
CvBytes :: ByteString -> CValue CBytes | |
CvMutez :: Mutez -> CValue CMutez | |
CvBool :: Bool -> CValue CBool | |
CvKeyHash :: KeyHash -> CValue CKeyHash | |
CvTimestamp :: Timestamp -> CValue CTimestamp | |
CvAddress :: Address -> CValue CAddress |
Instances
Eq (CValue t) Source # | |
Ord (CValue t) Source # | |
Defined in Michelson.Typed.CValue | |
Show (CValue t) Source # | |
Arbitrary (CValue CInt) Source # | |
Arbitrary (CValue CMutez) Source # | |
Arbitrary (CValue CKeyHash) Source # | |
Arbitrary (CValue CTimestamp) Source # | |
Defined in Michelson.Test.Gen arbitrary :: Gen (CValue CTimestamp) # shrink :: CValue CTimestamp -> [CValue CTimestamp] # |