morley-1.20.0: Developer tools for the Michelson Language
Safe HaskellSafe-Inferred
LanguageHaskell2010

Morley.Micheline.Expression

Contents

Description

Module that defines Expression type, its related types and its JSON instance.

Synopsis

Documentation

data Exp x Source #

Type for Micheline Expression with extension points.

Following the Trees-that-Grow approach, this type provides the core set of constructors used by Tezos accompanied with additional data (XExp*). Plus additional constructors provided by XExp.

The type argument x will be called extension descriptor and it must have ExpExtensionDescriptor instance.

Bundled Patterns

pattern ExpPrim' :: XExpPrim x -> MichelinePrimitive -> [Exp x] -> [Annotation] -> Exp x 

Instances

Instances details
FromJSON Expression Source # 
Instance details

Defined in Morley.Micheline.Expression

ToJSON Expression Source # 
Instance details

Defined in Morley.Micheline.Expression

ToExpression Expression Source # 
Instance details

Defined in Morley.Micheline.Class

Buildable Expression Source # 
Instance details

Defined in Morley.Micheline.Expression

Methods

build :: Expression -> Doc

buildList :: [Expression] -> Doc

ExpAllExtrasConstrainted (Lift :: Type -> Constraint) x => Lift (Exp x :: Type) Source # 
Instance details

Defined in Morley.Micheline.Expression

Methods

lift :: Quote m => Exp x -> m Exp0 #

liftTyped :: forall (m :: Type -> Type). Quote m => Exp x -> Code m (Exp x) #

(ExpAllExtrasConstrainted Data x, Typeable x) => Data (Exp x) Source # 
Instance details

Defined in Morley.Micheline.Expression

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Exp x -> c (Exp x) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Exp x) #

toConstr :: Exp x -> Constr #

dataTypeOf :: Exp x -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Exp x)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Exp x)) #

gmapT :: (forall b. Data b => b -> b) -> Exp x -> Exp x #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Exp x -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Exp x -> r #

gmapQ :: (forall d. Data d => d -> u) -> Exp x -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Exp x -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Exp x -> m (Exp x) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Exp x -> m (Exp x) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Exp x -> m (Exp x) #

ExpAllExtrasConstrainted Show x => Show (Exp x) Source # 
Instance details

Defined in Morley.Micheline.Expression

Methods

showsPrec :: Int -> Exp x -> ShowS #

show :: Exp x -> String #

showList :: [Exp x] -> ShowS #

ExpAllExtrasConstrainted Eq x => Eq (Exp x) Source # 
Instance details

Defined in Morley.Micheline.Expression

Methods

(==) :: Exp x -> Exp x -> Bool #

(/=) :: Exp x -> Exp x -> Bool #

(Typeable x, ExpAllExtrasConstrainted Data x, ExpAllExtrasConstrainted (Typeable :: Type -> Constraint) x) => Plated (Exp x) Source #

Default instance that uses uniplate as implementation.

If it tries to find expressions for polymorphic types too agressively (requiring Data where you don't what that), feel free to define an overlapping manual instance.

Instance details

Defined in Morley.Micheline.Expression

Methods

plate :: Traversal' (Exp x) (Exp x) #

data RegularExp :: ExpExtensionDescriptorKind Source #

Extension descriptor for plain expressions without additional data.

Instances

Instances details
FromJSON Expression Source # 
Instance details

Defined in Morley.Micheline.Expression

ToJSON Expression Source # 
Instance details

Defined in Morley.Micheline.Expression

Exception FromExpressionError Source # 
Instance details

Defined in Morley.Micheline.Class

ToExpression Expression Source # 
Instance details

Defined in Morley.Micheline.Class

ExpExtensionDescriptor RegularExp Source # 
Instance details

Defined in Morley.Micheline.Expression

Buildable FromExpressionError 
Instance details

Defined in Morley.Micheline.Class

Buildable Expression Source # 
Instance details

Defined in Morley.Micheline.Expression

Methods

build :: Expression -> Doc

buildList :: [Expression] -> Doc

FromExp RegularExp ExpandedOp Source # 
Instance details

Defined in Morley.Micheline.Class

(SingI inp, SingI out) => FromExp RegularExp (Instr '[inp] '[out]) Source # 
Instance details

Defined in Morley.Micheline.Class

type XExp RegularExp Source # 
Instance details

Defined in Morley.Micheline.Expression

type XExpBytes RegularExp Source # 
Instance details

Defined in Morley.Micheline.Expression

type XExpInt RegularExp Source # 
Instance details

Defined in Morley.Micheline.Expression

type XExpPrim RegularExp Source # 
Instance details

Defined in Morley.Micheline.Expression

type XExpSeq RegularExp Source # 
Instance details

Defined in Morley.Micheline.Expression

type XExpString RegularExp Source # 
Instance details

Defined in Morley.Micheline.Expression

type Expression = Exp RegularExp Source #

Simple expression without any extras.

data MichelinePrimAp x Source #

Instances

Instances details
Lift (Exp x) => Lift (MichelinePrimAp x :: Type) Source # 
Instance details

Defined in Morley.Micheline.Expression

Methods

lift :: Quote m => MichelinePrimAp x -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => MichelinePrimAp x -> Code m (MichelinePrimAp x) #

FromJSON (Exp x) => FromJSON (MichelinePrimAp x) Source # 
Instance details

Defined in Morley.Micheline.Expression

ToJSON (Exp x) => ToJSON (MichelinePrimAp x) Source # 
Instance details

Defined in Morley.Micheline.Expression

(Data (Exp x), Typeable x) => Data (MichelinePrimAp x) Source # 
Instance details

Defined in Morley.Micheline.Expression

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MichelinePrimAp x -> c (MichelinePrimAp x) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (MichelinePrimAp x) #

toConstr :: MichelinePrimAp x -> Constr #

dataTypeOf :: MichelinePrimAp x -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (MichelinePrimAp x)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (MichelinePrimAp x)) #

gmapT :: (forall b. Data b => b -> b) -> MichelinePrimAp x -> MichelinePrimAp x #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MichelinePrimAp x -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MichelinePrimAp x -> r #

gmapQ :: (forall d. Data d => d -> u) -> MichelinePrimAp x -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MichelinePrimAp x -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MichelinePrimAp x -> m (MichelinePrimAp x) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MichelinePrimAp x -> m (MichelinePrimAp x) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MichelinePrimAp x -> m (MichelinePrimAp x) #

Show (Exp x) => Show (MichelinePrimAp x) Source # 
Instance details

Defined in Morley.Micheline.Expression

Eq (Exp x) => Eq (MichelinePrimAp x) Source # 
Instance details

Defined in Morley.Micheline.Expression

data MichelinePrimitive Source #

Constructors

Prim_parameter 
Prim_storage 
Prim_code 
Prim_False 
Prim_Elt 
Prim_Left 
Prim_None 
Prim_Pair 
Prim_Right 
Prim_Some 
Prim_True 
Prim_Unit 
Prim_PACK 
Prim_UNPACK 
Prim_BLAKE2B 
Prim_SHA256 
Prim_SHA512 
Prim_ABS 
Prim_ADD 
Prim_AMOUNT 
Prim_AND 
Prim_BALANCE 
Prim_CAR 
Prim_CDR 
Prim_CHECK_SIGNATURE 
Prim_COMPARE 
Prim_CONCAT 
Prim_CONS 
Prim_CREATE_ACCOUNT 
Prim_CREATE_CONTRACT 
Prim_IMPLICIT_ACCOUNT 
Prim_DIP 
Prim_DROP 
Prim_DUP 
Prim_EDIV 
Prim_EMPTY_MAP 
Prim_EMPTY_SET 
Prim_EQ 
Prim_EXEC 
Prim_FAILWITH 
Prim_GE 
Prim_GET 
Prim_GT 
Prim_HASH_KEY 
Prim_IF 
Prim_IF_CONS 
Prim_IF_LEFT 
Prim_IF_NONE 
Prim_INT 
Prim_LAMBDA 
Prim_LE 
Prim_LEFT 
Prim_LOOP 
Prim_LSL 
Prim_LSR 
Prim_LT 
Prim_MAP 
Prim_MEM 
Prim_MUL 
Prim_NEG 
Prim_NEQ 
Prim_NIL 
Prim_NONE 
Prim_NOT 
Prim_NOW 
Prim_OR 
Prim_PAIR 
Prim_PUSH 
Prim_RIGHT 
Prim_SIZE 
Prim_SOME 
Prim_SOURCE 
Prim_SENDER 
Prim_SELF 
Prim_STEPS_TO_QUOTA 
Prim_SUB 
Prim_SWAP 
Prim_TRANSFER_TOKENS 
Prim_SET_DELEGATE 
Prim_UNIT 
Prim_UPDATE 
Prim_XOR 
Prim_ITER 
Prim_LOOP_LEFT 
Prim_ADDRESS 
Prim_CONTRACT 
Prim_ISNAT 
Prim_CAST 
Prim_RENAME 
Prim_bool 
Prim_contract 
Prim_int 
Prim_key 
Prim_key_hash 
Prim_lambda 
Prim_list 
Prim_map 
Prim_big_map 
Prim_nat 
Prim_option 
Prim_or 
Prim_pair 
Prim_set 
Prim_signature 
Prim_string 
Prim_bytes 
Prim_mutez 
Prim_timestamp 
Prim_unit 
Prim_operation 
Prim_address 
Prim_SLICE 
Prim_DIG 
Prim_DUG 
Prim_EMPTY_BIG_MAP 
Prim_APPLY 
Prim_chain_id 
Prim_CHAIN_ID 
Prim_LEVEL 
Prim_SELF_ADDRESS 
Prim_never 
Prim_NEVER 
Prim_UNPAIR 
Prim_VOTING_POWER 
Prim_TOTAL_VOTING_POWER 
Prim_KECCAK 
Prim_SHA3 
Prim_PAIRING_CHECK 
Prim_bls12_381_g1 
Prim_bls12_381_g2 
Prim_bls12_381_fr 
Prim_sapling_state 
Prim_sapling_transaction_deprecated 
Prim_SAPLING_EMPTY_STATE 
Prim_SAPLING_VERIFY_UPDATE 
Prim_ticket 
Prim_TICKET_DEPRECATED 
Prim_READ_TICKET 
Prim_SPLIT_TICKET 
Prim_JOIN_TICKETS 
Prim_GET_AND_UPDATE 
Prim_chest 
Prim_chest_key 
Prim_OPEN_CHEST 
Prim_VIEW 
Prim_view 
Prim_constant 
Prim_SUB_MUTEZ 
Prim_tx_rollup_l2_address 
Prim_MIN_BLOCK_TIME 
Prim_sapling_transaction 
Prim_EMIT 
Prim_Lambda_rec 
Prim_LAMBDA_REC 
Prim_TICKET 
Prim_BYTES 
Prim_NAT 

Instances

Instances details
FromJSON MichelinePrimitive Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

ToJSON MichelinePrimitive Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Data MichelinePrimitive Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MichelinePrimitive -> c MichelinePrimitive #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MichelinePrimitive #

toConstr :: MichelinePrimitive -> Constr #

dataTypeOf :: MichelinePrimitive -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MichelinePrimitive) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MichelinePrimitive) #

gmapT :: (forall b. Data b => b -> b) -> MichelinePrimitive -> MichelinePrimitive #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MichelinePrimitive -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MichelinePrimitive -> r #

gmapQ :: (forall d. Data d => d -> u) -> MichelinePrimitive -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MichelinePrimitive -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MichelinePrimitive -> m MichelinePrimitive #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MichelinePrimitive -> m MichelinePrimitive #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MichelinePrimitive -> m MichelinePrimitive #

Bounded MichelinePrimitive Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Enum MichelinePrimitive Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Read MichelinePrimitive Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Show MichelinePrimitive Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Eq MichelinePrimitive Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Ord MichelinePrimitive Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Buildable MichelinePrimitive Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Lift MichelinePrimitive Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

type PrettyShow MichelinePrimitive Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

type PrettyShow MichelinePrimitive = ()

data MichelinePrimitiveTag Source #

Simple classification datakind for MichelinePrimitive.

Constructors

MPTKeyword

Keywords, like parameter, code, storage, view

MPTInstr

Instructions, e.g. UNIT, DIP, etc

MPTValue

Value constructors like Left, Lambda_rec, etc

MPTType

Types, like unit, list, etc

MPTRemoved

Removed primitives: CREATE_ACCOUNT, STEPS_TO_QUOTA

MPTConstant

Keyword constant for global constants

Instances

Instances details
Bounded MichelinePrimitiveTag Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Enum MichelinePrimitiveTag Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Show MichelinePrimitiveTag Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Eq MichelinePrimitiveTag Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Buildable MichelinePrimitiveTag Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

SingKind MichelinePrimitiveTag Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Associated Types

type Demote MichelinePrimitiveTag = (r :: Type) #

SDecide MichelinePrimitiveTag Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Methods

(%~) :: forall (a :: MichelinePrimitiveTag) (b :: MichelinePrimitiveTag). Sing a -> Sing b -> Decision (a :~: b) #

TestCoercion SingMichelinePrimitiveTag Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Methods

testCoercion :: forall (a :: k) (b :: k). SingMichelinePrimitiveTag a -> SingMichelinePrimitiveTag b -> Maybe (Coercion a b) #

TestEquality SingMichelinePrimitiveTag Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Methods

testEquality :: forall (a :: k) (b :: k). SingMichelinePrimitiveTag a -> SingMichelinePrimitiveTag b -> Maybe (a :~: b) #

SingI 'MPTConstant Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Methods

sing :: Sing 'MPTConstant #

SingI 'MPTInstr Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Methods

sing :: Sing 'MPTInstr #

SingI 'MPTKeyword Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Methods

sing :: Sing 'MPTKeyword #

SingI 'MPTRemoved Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Methods

sing :: Sing 'MPTRemoved #

SingI 'MPTType Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Methods

sing :: Sing 'MPTType #

SingI 'MPTValue Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

Methods

sing :: Sing 'MPTValue #

Lift MichelinePrimitiveTag Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

type Demote MichelinePrimitiveTag Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

type Sing Source # 
Instance details

Defined in Morley.Micheline.Expression.Internal.MichelinePrimitive

data ClassifiedMichelinePrimitive (tag :: MichelinePrimitiveTag) where Source #

GADT that has the same shape as MichelinePrimitive, but each constructor carries a MichelinePrimitiveTag tag with classification.

Constructors

C_Prim_parameter :: ClassifiedMichelinePrimitive 'MPTKeyword 
C_Prim_storage :: ClassifiedMichelinePrimitive 'MPTKeyword 
C_Prim_code :: ClassifiedMichelinePrimitive 'MPTKeyword 
C_Prim_False :: ClassifiedMichelinePrimitive 'MPTValue 
C_Prim_Elt :: ClassifiedMichelinePrimitive 'MPTValue 
C_Prim_Left :: ClassifiedMichelinePrimitive 'MPTValue 
C_Prim_None :: ClassifiedMichelinePrimitive 'MPTValue 
C_Prim_Pair :: ClassifiedMichelinePrimitive 'MPTValue 
C_Prim_Right :: ClassifiedMichelinePrimitive 'MPTValue 
C_Prim_Some :: ClassifiedMichelinePrimitive 'MPTValue 
C_Prim_True :: ClassifiedMichelinePrimitive 'MPTValue 
C_Prim_Unit :: ClassifiedMichelinePrimitive 'MPTValue 
C_Prim_PACK :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_UNPACK :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_BLAKE2B :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_SHA256 :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_SHA512 :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_ABS :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_ADD :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_AMOUNT :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_AND :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_BALANCE :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_CAR :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_CDR :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_CHECK_SIGNATURE :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_COMPARE :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_CONCAT :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_CONS :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_CREATE_ACCOUNT :: ClassifiedMichelinePrimitive 'MPTRemoved 
C_Prim_CREATE_CONTRACT :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_IMPLICIT_ACCOUNT :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_DIP :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_DROP :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_DUP :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_EDIV :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_EMPTY_MAP :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_EMPTY_SET :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_EQ :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_EXEC :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_FAILWITH :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_GE :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_GET :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_GT :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_HASH_KEY :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_IF :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_IF_CONS :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_IF_LEFT :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_IF_NONE :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_INT :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_LAMBDA :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_LE :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_LEFT :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_LOOP :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_LSL :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_LSR :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_LT :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_MAP :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_MEM :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_MUL :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_NEG :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_NEQ :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_NIL :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_NONE :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_NOT :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_NOW :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_OR :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_PAIR :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_PUSH :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_RIGHT :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_SIZE :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_SOME :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_SOURCE :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_SENDER :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_SELF :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_STEPS_TO_QUOTA :: ClassifiedMichelinePrimitive 'MPTRemoved 
C_Prim_SUB :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_SWAP :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_TRANSFER_TOKENS :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_SET_DELEGATE :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_UNIT :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_UPDATE :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_XOR :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_ITER :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_LOOP_LEFT :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_ADDRESS :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_CONTRACT :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_ISNAT :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_CAST :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_RENAME :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_bool :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_contract :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_int :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_key :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_key_hash :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_lambda :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_list :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_map :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_big_map :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_nat :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_option :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_or :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_pair :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_set :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_signature :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_string :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_bytes :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_mutez :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_timestamp :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_unit :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_operation :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_address :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_SLICE :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_DIG :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_DUG :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_EMPTY_BIG_MAP :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_APPLY :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_chain_id :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_CHAIN_ID :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_LEVEL :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_SELF_ADDRESS :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_never :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_NEVER :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_UNPAIR :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_VOTING_POWER :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_TOTAL_VOTING_POWER :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_KECCAK :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_SHA3 :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_PAIRING_CHECK :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_bls12_381_g1 :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_bls12_381_g2 :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_bls12_381_fr :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_sapling_state :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_sapling_transaction_deprecated :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_SAPLING_EMPTY_STATE :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_SAPLING_VERIFY_UPDATE :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_ticket :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_TICKET_DEPRECATED :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_READ_TICKET :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_SPLIT_TICKET :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_JOIN_TICKETS :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_GET_AND_UPDATE :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_chest :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_chest_key :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_OPEN_CHEST :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_VIEW :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_view :: ClassifiedMichelinePrimitive 'MPTKeyword 
C_Prim_constant :: ClassifiedMichelinePrimitive 'MPTConstant 
C_Prim_SUB_MUTEZ :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_tx_rollup_l2_address :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_MIN_BLOCK_TIME :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_sapling_transaction :: ClassifiedMichelinePrimitive 'MPTType 
C_Prim_EMIT :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_Lambda_rec :: ClassifiedMichelinePrimitive 'MPTValue 
C_Prim_LAMBDA_REC :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_TICKET :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_BYTES :: ClassifiedMichelinePrimitive 'MPTInstr 
C_Prim_NAT :: ClassifiedMichelinePrimitive 'MPTInstr 

withClassifiedPrim :: MichelinePrimitive -> (forall tag. Sing tag -> ClassifiedMichelinePrimitive tag -> r) -> r Source #

Classify a MichelinePrimitive. Intended to be used with LambdaCase, similar to withClassifiedInstr.

type ExpExtensionDescriptorKind = ExpExtensionTag -> Type Source #

Kind of extension descriptors.

We use a dedicated open type for this, not just Type, to notice earlier when type arguments are mis-placed.

class ExpExtensionDescriptor (x :: ExpExtensionDescriptorKind) Source #

Defines details of extension descriptor.

Associated Types

type XExpInt x :: Type Source #

Additional data in ExpInt constructor.

type XExpInt _ = ()

type XExpString x :: Type Source #

Additional data in ExpString constructor.

type XExpString _ = ()

type XExpBytes x :: Type Source #

Additional data in ExpBytes constructor.

type XExpBytes _ = ()

type XExpSeq x :: Type Source #

Additional data in ExpSeq constructor.

type XExpSeq _ = ()

type XExpPrim x :: Type Source #

Additional data in ExpPrim constructor.

type XExpPrim _ = ()

type XExp x :: Type Source #

Additional constructors.

type XExp _ = Void

type ExpExtrasConstrained c x = Each '[c] [XExpInt x, XExpString x, XExpBytes x, XExpSeq x, XExpPrim x] Source #

Constraint all the extra fields provided by this extension.

type ExpAllExtrasConstrainted c x = (ExpExtrasConstrained c x, c (XExp x)) Source #

Constraint all the extra fields and the constructor provided by this extension.

data ExpExtras f x Source #

A helper type that carries something for all extra fields.

Fields are carried in the given functor f so that one could provide a generator, parser or something else.

Extra constructor is not included here as it may need special treatment, you have to carry it separately.

Constructors

ExpExtras 

Fields

mkUniformExpExtras :: (extra ~ XExpInt x, extra ~ XExpString x, extra ~ XExpBytes x, extra ~ XExpSeq x, extra ~ XExpPrim x) => f extra -> ExpExtras f x Source #

Fill ExpExtras with the same data, assuming all types of extras are the same.

hoistExpExtras :: (forall extra. f1 extra -> f2 extra) -> ExpExtras f1 x -> ExpExtras f2 x Source #

Change the functor used in ExpExtras.

data Annotation Source #

Instances

Instances details
FromJSON Annotation Source # 
Instance details

Defined in Morley.Micheline.Expression

ToJSON Annotation Source # 
Instance details

Defined in Morley.Micheline.Expression

Data Annotation Source # 
Instance details

Defined in Morley.Micheline.Expression

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Annotation -> c Annotation #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Annotation #

toConstr :: Annotation -> Constr #

dataTypeOf :: Annotation -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Annotation) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Annotation) #

gmapT :: (forall b. Data b => b -> b) -> Annotation -> Annotation #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Annotation -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Annotation -> r #

gmapQ :: (forall d. Data d => d -> u) -> Annotation -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Annotation -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Annotation -> m Annotation #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Annotation -> m Annotation #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Annotation -> m Annotation #

Show Annotation Source # 
Instance details

Defined in Morley.Micheline.Expression

Eq Annotation Source # 
Instance details

Defined in Morley.Micheline.Expression

Lift Annotation Source # 
Instance details

Defined in Morley.Micheline.Expression

Methods

lift :: Quote m => Annotation -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Annotation -> Code m Annotation #

Prisms

_ExpInt :: forall x. Prism' (Exp x) (XExpInt x, Integer) Source #

_ExpString :: forall x. Prism' (Exp x) (XExpString x, Text) Source #

_ExpSeq :: forall x. Prism' (Exp x) (XExpSeq x, [Exp x]) Source #

Lenses

mpaArgsL :: forall x x. Lens (MichelinePrimAp x) (MichelinePrimAp x) [Exp x] [Exp x] Source #