Safe Haskell | None |
---|---|
Language | Haskell2010 |
Futhark prettyprinter. This module defines Pretty
instances
for the AST defined in Futhark.Representation.AST.Syntax,
but also a number of convenience functions if you don't want to use
the interface from Pretty
.
Synopsis
- prettyTuple :: Pretty a => [a] -> String
- pretty :: Pretty a => a -> String
- class PrettyAnnot a where
- class (Annotations lore, Pretty (RetType lore), Pretty (BranchType lore), Pretty (ParamT (FParamAttr lore)), Pretty (ParamT (LParamAttr lore)), Pretty (PatElemT (LetAttr lore)), PrettyAnnot (PatElem lore), PrettyAnnot (FParam lore), PrettyAnnot (LParam lore), Pretty (Op lore)) => PrettyLore lore where
- ppTuple' :: Pretty a => [a] -> Doc
- bindingAnnotation :: PrettyLore lore => Stm lore -> Doc -> Doc
Documentation
prettyTuple :: Pretty a => [a] -> String Source #
Prettyprint a list enclosed in curly braces.
class PrettyAnnot a where Source #
Class for values that may have some prettyprinted annotation.
Instances
PrettyAnnot () Source # | |
PrettyAnnot (PatElemT attr) => PrettyAnnot (PatElemT (Range, attr)) Source # | |
PrettyAnnot (PatElemT attr) => PrettyAnnot (PatElemT (VarAliases, attr)) Source # | |
Defined in Futhark.Representation.Aliases | |
PrettyAnnot (PatElemT attr) => PrettyAnnot (PatElemT (VarWisdom, attr)) Source # | |
PrettyAnnot (PatElemT (TypeBase shape u)) Source # | |
(Pretty u, Pretty r) => PrettyAnnot (PatElemT (MemInfo SubExp u r)) Source # | |
PrettyAnnot (ParamT (TypeBase shape u)) Source # | |
(Pretty u, Pretty r) => PrettyAnnot (ParamT (MemInfo SubExp u r)) Source # | |
class (Annotations lore, Pretty (RetType lore), Pretty (BranchType lore), Pretty (ParamT (FParamAttr lore)), Pretty (ParamT (LParamAttr lore)), Pretty (PatElemT (LetAttr lore)), PrettyAnnot (PatElem lore), PrettyAnnot (FParam lore), PrettyAnnot (LParam lore), Pretty (Op lore)) => PrettyLore lore where Source #
The class of lores whose annotations can be prettyprinted.
Nothing
Instances
PrettyLore SOACS Source # | |
PrettyLore InKernel Source # | |
PrettyLore Kernels Source # | |
PrettyLore InKernel Source # | |
PrettyLore ExplicitMemory Source # | |
Defined in Futhark.Representation.ExplicitMemory ppExpLore :: ExpAttr ExplicitMemory -> Exp ExplicitMemory -> Maybe Doc Source # | |
(PrettyLore lore, CanBeRanged (Op lore)) => PrettyLore (Ranges lore) Source # | |
(Attributes lore, CanBeAliased (Op lore)) => PrettyLore (Aliases lore) Source # | |
(PrettyLore lore, CanBeWise (Op lore)) => PrettyLore (Wise lore) Source # | |
bindingAnnotation :: PrettyLore lore => Stm lore -> Doc -> Doc Source #