Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
class RenderDoc a where Source #
Generalize converting a type into a Text.PrettyPrint.Leijen.Text.Doc. Used to pretty print Michelson code and define Fmt.Buildable instances.
renderDoc :: a -> Doc Source #
isRenderable :: a -> Bool Source #
Whether a value can be represented in Michelson code.
Normally either all values of some type are renderable or not renderable.
However, in case of instructions we have extra instructions which should
not be rendered.
Note: it's not suficcient to just return mempty
for such instructions,
because sometimes we want to print lists of instructions and we need to
ignore them complete (to avoid putting redundant separators).