| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Michelson.Untyped.Ext
Synopsis
- data ExtInstrAbstract op
- = STACKTYPE StackTypePattern
- | FN Text StackFn [op]
- | UTEST_ASSERT (TestAssert op)
- | UPRINT PrintComment
- | UCOMMENT Text
- newtype StackRef = StackRef Natural
- newtype PrintComment = PrintComment {}
- data TestAssert op = TestAssert {
- tassName :: Text
- tassComment :: PrintComment
- tassInstrs :: [op]
- newtype Var = Var Text
- data TyVar
- data StackTypePattern
- data StackFn = StackFn {}
- varSet :: StackTypePattern -> Set Var
- stackTypePatternToList :: StackTypePattern -> ([TyVar], Bool)
Documentation
data ExtInstrAbstract op Source #
Implementation-specific instructions embedded in a NOP primitive, which
mark a specific point during a contract's typechecking or execution.
These instructions are not allowed to modify the contract's stack, but may impose additional constraints that can cause a contract to report errors in type-checking or testing.
Additionaly, some implementation-specific language features such as
type-checking of LetMacros are implemented using this mechanism
(specifically FN and FN_END).
Constructors
| STACKTYPE StackTypePattern | Matches current stack against a type-pattern |
| FN Text StackFn [op] | A typed stack function (push and pop a |
| UTEST_ASSERT (TestAssert op) | Copy the current stack and run an inline assertion on it |
| UPRINT PrintComment | Print a comment with optional embedded |
| UCOMMENT Text | A comment in Michelson code |
Instances
A reference into the stack.
Instances
| Eq StackRef Source # | |
| Data StackRef Source # | |
Defined in Michelson.Untyped.Ext Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StackRef -> c StackRef # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StackRef # toConstr :: StackRef -> Constr # dataTypeOf :: StackRef -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StackRef) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StackRef) # gmapT :: (forall b. Data b => b -> b) -> StackRef -> StackRef # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StackRef -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StackRef -> r # gmapQ :: (forall d. Data d => d -> u) -> StackRef -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> StackRef -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> StackRef -> m StackRef # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StackRef -> m StackRef # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StackRef -> m StackRef # | |
| Show StackRef Source # | |
| Generic StackRef Source # | |
| ToJSON StackRef Source # | |
Defined in Michelson.Untyped.Ext | |
| FromJSON StackRef Source # | |
| NFData StackRef Source # | |
Defined in Michelson.Untyped.Ext | |
| Buildable StackRef Source # | |
Defined in Michelson.Untyped.Ext | |
| type Rep StackRef Source # | |
Defined in Michelson.Untyped.Ext | |
newtype PrintComment Source #
Constructors
| PrintComment | |
Fields | |
Instances
data TestAssert op Source #
Constructors
| TestAssert | |
Fields
| |
Instances
Instances
| Eq Var Source # | |
| Data Var Source # | |
Defined in Michelson.Untyped.Ext Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Var -> c Var # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Var # dataTypeOf :: Var -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Var) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Var) # gmapT :: (forall b. Data b => b -> b) -> Var -> Var # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Var -> r # gmapQ :: (forall d. Data d => d -> u) -> Var -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Var -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Var -> m Var # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Var -> m Var # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Var -> m Var # | |
| Ord Var Source # | |
| Show Var Source # | |
| Generic Var Source # | |
| ToJSON Var Source # | |
Defined in Michelson.Untyped.Ext | |
| FromJSON Var Source # | |
| NFData Var Source # | |
Defined in Michelson.Untyped.Ext | |
| Buildable Var Source # | |
Defined in Michelson.Untyped.Ext | |
| type Rep Var Source # | |
Defined in Michelson.Untyped.Ext | |
A type-variable or a type-constant
Instances
| Eq TyVar Source # | |
| Data TyVar Source # | |
Defined in Michelson.Untyped.Ext Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyVar -> c TyVar # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TyVar # dataTypeOf :: TyVar -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TyVar) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TyVar) # gmapT :: (forall b. Data b => b -> b) -> TyVar -> TyVar # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyVar -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyVar -> r # gmapQ :: (forall d. Data d => d -> u) -> TyVar -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TyVar -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyVar -> m TyVar # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyVar -> m TyVar # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyVar -> m TyVar # | |
| Show TyVar Source # | |
| Generic TyVar Source # | |
| ToJSON TyVar Source # | |
Defined in Michelson.Untyped.Ext | |
| FromJSON TyVar Source # | |
| NFData TyVar Source # | |
Defined in Michelson.Untyped.Ext | |
| Buildable TyVar Source # | |
Defined in Michelson.Untyped.Ext | |
| type Rep TyVar Source # | |
Defined in Michelson.Untyped.Ext type Rep TyVar = D1 ('MetaData "TyVar" "Michelson.Untyped.Ext" "morley-1.12.0-inplace" 'False) (C1 ('MetaCons "VarID" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Var)) :+: C1 ('MetaCons "TyCon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Type))) | |
data StackTypePattern Source #
A stack pattern-match
Constructors
| StkEmpty | |
| StkRest | |
| StkCons TyVar StackTypePattern |
Instances
A stack function that expresses the type signature of a LetMacro
Constructors
| StackFn | |
Fields | |
Instances
| Eq StackFn Source # | |
| Data StackFn Source # | |
Defined in Michelson.Untyped.Ext Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StackFn -> c StackFn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StackFn # toConstr :: StackFn -> Constr # dataTypeOf :: StackFn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StackFn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StackFn) # gmapT :: (forall b. Data b => b -> b) -> StackFn -> StackFn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StackFn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StackFn -> r # gmapQ :: (forall d. Data d => d -> u) -> StackFn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> StackFn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> StackFn -> m StackFn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StackFn -> m StackFn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StackFn -> m StackFn # | |
| Show StackFn Source # | |
| Generic StackFn Source # | |
| ToJSON StackFn Source # | |
Defined in Michelson.Untyped.Ext | |
| FromJSON StackFn Source # | |
| NFData StackFn Source # | |
Defined in Michelson.Untyped.Ext | |
| Buildable StackFn Source # | |
Defined in Michelson.Untyped.Ext | |
| type Rep StackFn Source # | |
Defined in Michelson.Untyped.Ext type Rep StackFn = D1 ('MetaData "StackFn" "Michelson.Untyped.Ext" "morley-1.12.0-inplace" 'False) (C1 ('MetaCons "StackFn" 'PrefixI 'True) (S1 ('MetaSel ('Just "sfnQuantifiedVars") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Set Var))) :*: (S1 ('MetaSel ('Just "sfnInPattern") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 StackTypePattern) :*: S1 ('MetaSel ('Just "sfnOutPattern") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 StackTypePattern)))) | |
stackTypePatternToList :: StackTypePattern -> ([TyVar], Bool) Source #
Convert StackTypePattern to a list of types. Also returns
Bool which is True if the pattern is a fixed list of types and
False if it's a pattern match on the head of the stack.