Safe Haskell | None |
---|---|
Language | Haskell2010 |
Michelson.Typed.Value
Description
Module, containing data types for Michelson value.
Synopsis
- data Value' instr t where
- VC :: CValue t -> Value' instr (Tc t)
- VKey :: PublicKey -> Value' instr TKey
- VUnit :: Value' instr TUnit
- VSignature :: Signature -> Value' instr TSignature
- VOption :: forall t instr. Maybe (Value' instr t) -> Value' instr (TOption t)
- VList :: forall t instr. [Value' instr t] -> Value' instr (TList t)
- VSet :: forall t instr. Set (CValue t) -> Value' instr (TSet t)
- VOp :: Operation' instr -> Value' instr TOperation
- VContract :: forall p instr. Address -> Value' instr (TContract p)
- VPair :: forall l r instr. (Value' instr l, Value' instr r) -> Value' instr (TPair l r)
- VOr :: forall l r instr. Either (Value' instr l) (Value' instr r) -> Value' instr (TOr l r)
- VLam :: forall inp out instr. (Show (instr '[inp] '[out]), Eq (instr '[inp] '[out])) => instr (inp ': '[]) (out ': '[]) -> Value' instr (TLambda inp out)
- VMap :: forall k v instr. Map (CValue k) (Value' instr v) -> Value' instr (TMap k v)
- VBigMap :: forall k v instr. Map (CValue k) (Value' instr v) -> Value' instr (TBigMap k v)
- type ContractInp1 param st = TPair param st
- type ContractInp param st = '[ContractInp1 param st]
- type ContractOut1 st = TPair (TList TOperation) st
- type ContractOut st = '[ContractOut1 st]
- data CreateAccount = CreateAccount {
- caManager :: !KeyHash
- caDelegate :: !(Maybe KeyHash)
- caSpendable :: !Bool
- caBalance :: !Mutez
- data CreateContract instr cp st = (Show (instr (ContractInp cp st) (ContractOut st)), Eq (instr (ContractInp cp st) (ContractOut st))) => CreateContract {
- ccManager :: !KeyHash
- ccDelegate :: !(Maybe KeyHash)
- ccSpendable :: !Bool
- ccDelegatable :: !Bool
- ccBalance :: !Mutez
- ccStorageVal :: !(Value' instr st)
- ccContractCode :: !(instr (ContractInp cp st) (ContractOut st))
- 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
- data Operation' instr where
- OpTransferTokens :: (Typeable p, SingI p, HasNoOp p) => TransferTokens instr p -> Operation' instr
- OpSetDelegate :: SetDelegate -> Operation' instr
- OpCreateAccount :: CreateAccount -> Operation' instr
- OpCreateContract :: (Show (instr (ContractInp cp st) (ContractOut st)), SingI cp, SingI st, Typeable instr, Typeable cp, Typeable st, HasNoOp cp, HasNoOp st) => CreateContract instr cp st -> Operation' instr
- data SetDelegate = SetDelegate {
- sdMbKeyHash :: !(Maybe KeyHash)
- data TransferTokens instr p = TransferTokens {
- ttContractParameter :: !(Value' instr p)
- ttAmount :: !Mutez
- ttContract :: !(Value' instr (TContract p))
Documentation
data Value' instr t where Source #
Representation of Michelson value.
Type parameter instr
stands for Michelson instruction
type, i.e. data type to represent an instruction of language.
Constructors
VC :: CValue t -> Value' instr (Tc t) | |
VKey :: PublicKey -> Value' instr TKey | |
VUnit :: Value' instr TUnit | |
VSignature :: Signature -> Value' instr TSignature | |
VOption :: forall t instr. Maybe (Value' instr t) -> Value' instr (TOption t) | |
VList :: forall t instr. [Value' instr t] -> Value' instr (TList t) | |
VSet :: forall t instr. Set (CValue t) -> Value' instr (TSet t) | |
VOp :: Operation' instr -> Value' instr TOperation | |
VContract :: forall p instr. Address -> Value' instr (TContract p) | |
VPair :: forall l r instr. (Value' instr l, Value' instr r) -> Value' instr (TPair l r) | |
VOr :: forall l r instr. Either (Value' instr l) (Value' instr r) -> Value' instr (TOr l r) | |
VLam :: forall inp out instr. (Show (instr '[inp] '[out]), Eq (instr '[inp] '[out])) => instr (inp ': '[]) (out ': '[]) -> Value' instr (TLambda inp out) | |
VMap :: forall k v instr. Map (CValue k) (Value' instr v) -> Value' instr (TMap k v) | |
VBigMap :: forall k v instr. Map (CValue k) (Value' instr v) -> Value' instr (TBigMap k v) |
Instances
Eq (Value' instr t) Source # | |
Show (Value' instr t) Source # | |
(Arbitrary (Value' instr a), Arbitrary (Value' instr b)) => Arbitrary (Value' instr (TPair a b)) Source # | |
Arbitrary (Value' instr TUnit) Source # | |
Arbitrary (Value' instr a) => Arbitrary (Value' instr (TList a)) Source # | |
Arbitrary (CValue a) => Arbitrary (Value' instr (Tc a)) Source # | |
type ContractInp1 param st = TPair param st Source #
type ContractInp param st = '[ContractInp1 param st] Source #
type ContractOut1 st = TPair (TList TOperation) st Source #
type ContractOut st = '[ContractOut1 st] Source #
data CreateAccount Source #
Constructors
CreateAccount | |
Fields
|
Instances
Eq CreateAccount Source # | |
Defined in Michelson.Typed.Value Methods (==) :: CreateAccount -> CreateAccount -> Bool # (/=) :: CreateAccount -> CreateAccount -> Bool # | |
Show CreateAccount Source # | |
Defined in Michelson.Typed.Value Methods showsPrec :: Int -> CreateAccount -> ShowS # show :: CreateAccount -> String # showList :: [CreateAccount] -> ShowS # | |
Buildable CreateAccount Source # | |
Defined in Michelson.Typed.Value Methods build :: CreateAccount -> Builder # |
data CreateContract instr cp st Source #
Constructors
(Show (instr (ContractInp cp st) (ContractOut st)), Eq (instr (ContractInp cp st) (ContractOut st))) => CreateContract | |
Fields
|
Instances
Eq (CreateContract instr cp st) Source # | |
Defined in Michelson.Typed.Value Methods (==) :: CreateContract instr cp st -> CreateContract instr cp st -> Bool # (/=) :: CreateContract instr cp st -> CreateContract instr cp st -> Bool # | |
Show (CreateContract instr cp st) Source # | |
Defined in Michelson.Typed.Value Methods showsPrec :: Int -> CreateContract instr cp st -> ShowS # show :: CreateContract instr cp st -> String # showList :: [CreateContract instr cp st] -> ShowS # | |
Buildable (CreateContract instr cp st) Source # | |
Defined in Michelson.Typed.Value Methods build :: CreateContract instr cp st -> Builder # |
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.
Constructors
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 |
data Operation' instr where Source #
Data type, representing operation, list of which is returned by Michelson contract (according to calling convention).
These operations are to be further executed against system state after the contract execution.
Constructors
OpTransferTokens :: (Typeable p, SingI p, HasNoOp p) => TransferTokens instr p -> Operation' instr | |
OpSetDelegate :: SetDelegate -> Operation' instr | |
OpCreateAccount :: CreateAccount -> Operation' instr | |
OpCreateContract :: (Show (instr (ContractInp cp st) (ContractOut st)), SingI cp, SingI st, Typeable instr, Typeable cp, Typeable st, HasNoOp cp, HasNoOp st) => CreateContract instr cp st -> Operation' instr |
Instances
IsoValue Operation Source # | |
Eq (Operation' instr) Source # | |
Defined in Michelson.Typed.Value Methods (==) :: Operation' instr -> Operation' instr -> Bool # (/=) :: Operation' instr -> Operation' instr -> Bool # | |
Show (Operation' instr) Source # | |
Defined in Michelson.Typed.Value Methods showsPrec :: Int -> Operation' instr -> ShowS # show :: Operation' instr -> String # showList :: [Operation' instr] -> ShowS # | |
Buildable (Operation' instr) Source # | |
Defined in Michelson.Typed.Value Methods build :: Operation' instr -> Builder # | |
(SingI (ToT cp), SingI (ToT st), NoOperation cp, NoOperation st, NoBigMap cp, CanHaveBigMap st) => IsContract (Contract cp st) Source # | |
Defined in Lorentz.Discover Methods toUntypedContract :: Contract cp st -> Contract0 Source # | |
type ToT Operation Source # | |
Defined in Michelson.Typed.Haskell.Value |
data SetDelegate Source #
Constructors
SetDelegate | |
Fields
|
Instances
Eq SetDelegate Source # | |
Defined in Michelson.Typed.Value | |
Show SetDelegate Source # | |
Defined in Michelson.Typed.Value Methods showsPrec :: Int -> SetDelegate -> ShowS # show :: SetDelegate -> String # showList :: [SetDelegate] -> ShowS # | |
Buildable SetDelegate Source # | |
Defined in Michelson.Typed.Value Methods build :: SetDelegate -> Builder # |
data TransferTokens instr p Source #
Constructors
TransferTokens | |
Fields
|
Instances
Eq (TransferTokens instr p) Source # | |
Defined in Michelson.Typed.Value Methods (==) :: TransferTokens instr p -> TransferTokens instr p -> Bool # (/=) :: TransferTokens instr p -> TransferTokens instr p -> Bool # | |
Show (TransferTokens instr p) Source # | |
Defined in Michelson.Typed.Value Methods showsPrec :: Int -> TransferTokens instr p -> ShowS # show :: TransferTokens instr p -> String # showList :: [TransferTokens instr p] -> ShowS # | |
Buildable (TransferTokens instr p) Source # | |
Defined in Michelson.Typed.Value Methods build :: TransferTokens instr p -> Builder # |