Safe Haskell | None |
---|---|
Language | Haskell2010 |
Language.Futhark.Pretty
Contents
Description
Futhark prettyprinter. This module defines Pretty
instances
for the AST defined in Language.Futhark.Syntax.
Documentation
prettyTuple :: Pretty a => [a] -> String Source #
Prettyprint a list enclosed in curly braces.
leadingOperator :: Name -> BinOp Source #
Given an operator name, return the operator that determines its syntactical properties.
A class for types that are variable names in the Futhark source
language. This is used instead of a mere Pretty
instance because
in the compiler frontend we want to print VNames differently
depending on whether the FUTHARK_COMPILER_DEBUGGING environment
variable is set, yet in the backend we want to always print VNames
with the tag. To avoid erroneously using the Pretty
instance for
VNames, we in fact only define it inside the modules for the core
language (as an orphan instance).
prettyName :: IsName v => v -> String Source #
Class for type constructors that represent annotations. Used in the prettyprinter to either print the original AST, or the computed attribute.
Minimal complete definition
unAnnot