| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Michelson.Untyped.Annotation
Description
Michelson annotations in untyped model.
Synopsis
- newtype Annotation tag = Annotation Text
- pattern WithAnn :: Annotation tag -> Annotation tag
- type TypeAnn = Annotation TypeTag
- type FieldAnn = Annotation FieldTag
- type VarAnn = Annotation VarTag
- type SomeAnn = Annotation SomeTag
- noAnn :: Annotation a
- ann :: Text -> Annotation a
- renderAnn :: forall tag. KnownAnnTag tag => Annotation tag -> Doc
- renderWEAnn :: forall tag. KnownAnnTag tag => Annotation tag -> Doc
- unifyAnn :: Annotation tag -> Annotation tag -> Maybe (Annotation tag)
- ifAnnUnified :: Annotation tag -> Annotation tag -> Bool
- disjoinVn :: VarAnn -> (VarAnn, VarAnn)
- convAnn :: Annotation tag1 -> Annotation tag2
Documentation
newtype Annotation tag Source #
Constructors
| Annotation Text |
Instances
pattern WithAnn :: Annotation tag -> Annotation tag Source #
type TypeAnn = Annotation TypeTag Source #
type FieldAnn = Annotation FieldTag Source #
type VarAnn = Annotation VarTag Source #
type SomeAnn = Annotation SomeTag Source #
noAnn :: Annotation a Source #
ann :: Text -> Annotation a Source #
renderAnn :: forall tag. KnownAnnTag tag => Annotation tag -> Doc Source #
renderWEAnn :: forall tag. KnownAnnTag tag => Annotation tag -> Doc Source #
Prints empty prefix in case of noAnn.
Such functionality is required in case when instruction has two annotations of the same type, former is empty and the latter is not. So that `PAIR noAnn noAnn noAnn %kek` is printed as `PAIR % %kek`
unifyAnn :: Annotation tag -> Annotation tag -> Maybe (Annotation tag) Source #
ifAnnUnified :: Annotation tag -> Annotation tag -> Bool Source #
convAnn :: Annotation tag1 -> Annotation tag2 Source #