morley-0.3.0.1: Developer tools for the Michelson Language

Safe HaskellNone
LanguageHaskell2010

Michelson.Typed.Value

Description

Module, containing data types for Michelson value.

Synopsis

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 # 
Instance details

Defined in Michelson.Typed.Value

Methods

(==) :: Value' instr t -> Value' instr t -> Bool #

(/=) :: Value' instr t -> Value' instr t -> Bool #

Show (Value' instr t) Source # 
Instance details

Defined in Michelson.Typed.Value

Methods

showsPrec :: Int -> Value' instr t -> ShowS #

show :: Value' instr t -> String #

showList :: [Value' instr t] -> ShowS #

(Arbitrary (Value' instr a), Arbitrary (Value' instr b)) => Arbitrary (Value' instr (TPair a b)) Source # 
Instance details

Defined in Michelson.Test.Gen

Methods

arbitrary :: Gen (Value' instr (TPair a b)) #

shrink :: Value' instr (TPair a b) -> [Value' instr (TPair a b)] #

Arbitrary (Value' instr TUnit) Source # 
Instance details

Defined in Michelson.Test.Gen

Methods

arbitrary :: Gen (Value' instr TUnit) #

shrink :: Value' instr TUnit -> [Value' instr TUnit] #

Arbitrary (Value' instr a) => Arbitrary (Value' instr (TList a)) Source # 
Instance details

Defined in Michelson.Test.Gen

Methods

arbitrary :: Gen (Value' instr (TList a)) #

shrink :: Value' instr (TList a) -> [Value' instr (TList a)] #

Arbitrary (CValue a) => Arbitrary (Value' instr (Tc a)) Source # 
Instance details

Defined in Michelson.Test.Gen

Methods

arbitrary :: Gen (Value' instr (Tc a)) #

shrink :: Value' instr (Tc a) -> [Value' instr (Tc a)] #

type ContractInp1 param st = TPair param st Source #

type ContractInp param st = '[ContractInp1 param st] Source #

data CreateContract instr cp st Source #

Constructors

(Show (instr (ContractInp cp st) (ContractOut st)), Eq (instr (ContractInp cp st) (ContractOut st))) => CreateContract 
Instances
Eq (CreateContract instr cp st) Source # 
Instance details

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 # 
Instance details

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 # 
Instance details

Defined in Michelson.Typed.Value

Methods

build :: CreateContract instr cp st -> Builder #

data CValue t where Source #

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.

Instances
Eq (CValue t) Source # 
Instance details

Defined in Michelson.Typed.CValue

Methods

(==) :: CValue t -> CValue t -> Bool #

(/=) :: CValue t -> CValue t -> Bool #

Ord (CValue t) Source # 
Instance details

Defined in Michelson.Typed.CValue

Methods

compare :: CValue t -> CValue t -> Ordering #

(<) :: CValue t -> CValue t -> Bool #

(<=) :: CValue t -> CValue t -> Bool #

(>) :: CValue t -> CValue t -> Bool #

(>=) :: CValue t -> CValue t -> Bool #

max :: CValue t -> CValue t -> CValue t #

min :: CValue t -> CValue t -> CValue t #

Show (CValue t) Source # 
Instance details

Defined in Michelson.Typed.CValue

Methods

showsPrec :: Int -> CValue t -> ShowS #

show :: CValue t -> String #

showList :: [CValue t] -> ShowS #

Arbitrary (CValue CInt) Source # 
Instance details

Defined in Michelson.Test.Gen

Arbitrary (CValue CMutez) Source # 
Instance details

Defined in Michelson.Test.Gen

Arbitrary (CValue CKeyHash) Source # 
Instance details

Defined in Michelson.Test.Gen

Arbitrary (CValue CTimestamp) Source # 
Instance details

Defined in Michelson.Test.Gen

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 # 
Instance details

Defined in Michelson.Typed.Haskell.Value

Associated Types

type ToT Operation :: T Source #

Eq (Operation' instr) Source # 
Instance details

Defined in Michelson.Typed.Value

Methods

(==) :: Operation' instr -> Operation' instr -> Bool #

(/=) :: Operation' instr -> Operation' instr -> Bool #

Show (Operation' instr) Source # 
Instance details

Defined in Michelson.Typed.Value

Methods

showsPrec :: Int -> Operation' instr -> ShowS #

show :: Operation' instr -> String #

showList :: [Operation' instr] -> ShowS #

Buildable (Operation' instr) Source # 
Instance details

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 # 
Instance details

Defined in Lorentz.Discover

type ToT Operation Source # 
Instance details

Defined in Michelson.Typed.Haskell.Value

data SetDelegate Source #

Constructors

SetDelegate 

Fields

Instances
Eq SetDelegate Source # 
Instance details

Defined in Michelson.Typed.Value

Show SetDelegate Source # 
Instance details

Defined in Michelson.Typed.Value

Buildable SetDelegate Source # 
Instance details

Defined in Michelson.Typed.Value

Methods

build :: SetDelegate -> Builder #

data TransferTokens instr p Source #

Constructors

TransferTokens 

Fields

Instances
Eq (TransferTokens instr p) Source # 
Instance details

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 # 
Instance details

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 # 
Instance details

Defined in Michelson.Typed.Value

Methods

build :: TransferTokens instr p -> Builder #