futhark-0.11.1: An optimising compiler for a functional, array-oriented language.

Safe HaskellNone
LanguageHaskell2010

Futhark.Representation.AST.Pretty

Contents

Description

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

Documentation

prettyTuple :: Pretty a => [a] -> String Source #

Prettyprint a list enclosed in curly braces.

pretty :: Pretty a => a -> String Source #

Prettyprint a value, wrapped to 80 characters.

class PrettyAnnot a where Source #

Class for values that may have some prettyprinted annotation.

Methods

ppAnnot :: a -> Maybe Doc Source #

Instances
PrettyAnnot () Source # 
Instance details

Defined in Futhark.Representation.AST.Pretty

Methods

ppAnnot :: () -> Maybe Doc Source #

PrettyAnnot (PatElemT attr) => PrettyAnnot (PatElemT (Range, attr)) Source # 
Instance details

Defined in Futhark.Representation.Ranges

Methods

ppAnnot :: PatElemT (Range, attr) -> Maybe Doc Source #

PrettyAnnot (PatElemT attr) => PrettyAnnot (PatElemT (VarAliases, attr)) Source # 
Instance details

Defined in Futhark.Representation.Aliases

Methods

ppAnnot :: PatElemT (VarAliases, attr) -> Maybe Doc Source #

PrettyAnnot (PatElemT attr) => PrettyAnnot (PatElemT (VarWisdom, attr)) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Methods

ppAnnot :: PatElemT (VarWisdom, attr) -> Maybe Doc Source #

PrettyAnnot (PatElemT (TypeBase shape u)) Source # 
Instance details

Defined in Futhark.Representation.AST.Pretty

Methods

ppAnnot :: PatElemT (TypeBase shape u) -> Maybe Doc Source #

(Pretty u, Pretty r) => PrettyAnnot (PatElemT (MemInfo SubExp u r)) Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory

PrettyAnnot (ParamT (TypeBase shape u)) Source # 
Instance details

Defined in Futhark.Representation.AST.Pretty

Methods

ppAnnot :: ParamT (TypeBase shape u) -> Maybe Doc Source #

(Pretty u, Pretty r) => PrettyAnnot (ParamT (MemInfo SubExp u r)) Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory

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.

Minimal complete definition

Nothing

Methods

ppExpLore :: ExpAttr lore -> Exp lore -> Maybe Doc Source #

Instances
PrettyLore SOACS Source # 
Instance details

Defined in Futhark.Representation.SOACS

PrettyLore InKernel Source # 
Instance details

Defined in Futhark.Representation.Kernels

PrettyLore Kernels Source # 
Instance details

Defined in Futhark.Representation.Kernels

PrettyLore InKernel Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory

PrettyLore ExplicitMemory Source # 
Instance details

Defined in Futhark.Representation.ExplicitMemory

(PrettyLore lore, CanBeRanged (Op lore)) => PrettyLore (Ranges lore) Source # 
Instance details

Defined in Futhark.Representation.Ranges

Methods

ppExpLore :: ExpAttr (Ranges lore) -> Exp (Ranges lore) -> Maybe Doc Source #

(Attributes lore, CanBeAliased (Op lore)) => PrettyLore (Aliases lore) Source # 
Instance details

Defined in Futhark.Representation.Aliases

Methods

ppExpLore :: ExpAttr (Aliases lore) -> Exp (Aliases lore) -> Maybe Doc Source #

(PrettyLore lore, CanBeWise (Op lore)) => PrettyLore (Wise lore) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Lore

Methods

ppExpLore :: ExpAttr (Wise lore) -> Exp (Wise lore) -> Maybe Doc Source #

ppTuple' :: Pretty a => [a] -> Doc Source #

Orphan instances

Pretty VName Source # 
Instance details

Methods

ppr :: VName -> Doc #

pprPrec :: Int -> VName -> Doc #

pprList :: [VName] -> Doc #

Pretty Commutativity Source # 
Instance details

Pretty SubExp Source # 
Instance details

Methods

ppr :: SubExp -> Doc #

pprPrec :: Int -> SubExp -> Doc #

pprList :: [SubExp] -> Doc #

Pretty Certificates Source # 
Instance details

Pretty Ident Source # 
Instance details

Methods

ppr :: Ident -> Doc #

pprPrec :: Int -> Ident -> Doc #

pprList :: [Ident] -> Doc #

Pretty NoUniqueness Source # 
Instance details

Pretty Space Source # 
Instance details

Methods

ppr :: Space -> Doc #

pprPrec :: Int -> Space -> Doc #

pprList :: [Space] -> Doc #

Pretty ExtShape Source # 
Instance details

Methods

ppr :: ExtShape -> Doc #

pprPrec :: Int -> ExtShape -> Doc #

pprList :: [ExtShape] -> Doc #

Pretty Shape Source # 
Instance details

Methods

ppr :: Shape -> Doc #

pprPrec :: Int -> Shape -> Doc #

pprList :: [Shape] -> Doc #

Pretty a => Pretty (ErrorMsg a) Source # 
Instance details

Methods

ppr :: ErrorMsg a -> Doc #

pprPrec :: Int -> ErrorMsg a -> Doc #

pprList :: [ErrorMsg a] -> Doc #

Pretty (PatElemT b) => Pretty (PatElemT (a, b)) Source # 
Instance details

Methods

ppr :: PatElemT (a, b) -> Doc #

pprPrec :: Int -> PatElemT (a, b) -> Doc #

pprList :: [PatElemT (a, b)] -> Doc #

Pretty (PatElemT Type) Source # 
Instance details

Pretty d => Pretty (DimIndex d) Source # 
Instance details

Methods

ppr :: DimIndex d -> Doc #

pprPrec :: Int -> DimIndex d -> Doc #

pprList :: [DimIndex d] -> Doc #

Pretty (ParamT b) => Pretty (ParamT (a, b)) Source # 
Instance details

Methods

ppr :: ParamT (a, b) -> Doc #

pprPrec :: Int -> ParamT (a, b) -> Doc #

pprList :: [ParamT (a, b)] -> Doc #

Pretty (ParamT DeclType) Source # 
Instance details

Pretty (ParamT Type) Source # 
Instance details

Methods

ppr :: ParamT Type -> Doc #

pprPrec :: Int -> ParamT Type -> Doc #

pprList :: [ParamT Type] -> Doc #

Pretty a => Pretty (Ext a) Source # 
Instance details

Methods

ppr :: Ext a -> Doc #

pprPrec :: Int -> Ext a -> Doc #

pprList :: [Ext a] -> Doc #

PrettyLore lore => Pretty (Prog lore) Source # 
Instance details

Methods

ppr :: Prog lore -> Doc #

pprPrec :: Int -> Prog lore -> Doc #

pprList :: [Prog lore] -> Doc #

PrettyLore lore => Pretty (FunDef lore) Source # 
Instance details

Methods

ppr :: FunDef lore -> Doc #

pprPrec :: Int -> FunDef lore -> Doc #

pprList :: [FunDef lore] -> Doc #

PrettyLore lore => Pretty (Lambda lore) Source # 
Instance details

Methods

ppr :: Lambda lore -> Doc #

pprPrec :: Int -> Lambda lore -> Doc #

pprList :: [Lambda lore] -> Doc #

PrettyLore lore => Pretty (Exp lore) Source # 
Instance details

Methods

ppr :: Exp lore -> Doc #

pprPrec :: Int -> Exp lore -> Doc #

pprList :: [Exp lore] -> Doc #

Pretty (BasicOp lore) Source # 
Instance details

Methods

ppr :: BasicOp lore -> Doc #

pprPrec :: Int -> BasicOp lore -> Doc #

pprList :: [BasicOp lore] -> Doc #

Pretty d => Pretty (DimChange d) Source # 
Instance details

Methods

ppr :: DimChange d -> Doc #

pprPrec :: Int -> DimChange d -> Doc #

pprList :: [DimChange d] -> Doc #

PrettyLore lore => Pretty (Body lore) Source # 
Instance details

Methods

ppr :: Body lore -> Doc #

pprPrec :: Int -> Body lore -> Doc #

pprList :: [Body lore] -> Doc #

PrettyLore lore => Pretty (Stms lore) Source # 
Instance details

Methods

ppr :: Stms lore -> Doc #

pprPrec :: Int -> Stms lore -> Doc #

pprList :: [Stms lore] -> Doc #

PrettyLore lore => Pretty (Stm lore) Source # 
Instance details

Methods

ppr :: Stm lore -> Doc #

pprPrec :: Int -> Stm lore -> Doc #

pprList :: [Stm lore] -> Doc #

Pretty (PatElemT attr) => Pretty (PatternT attr) Source # 
Instance details

Methods

ppr :: PatternT attr -> Doc #

pprPrec :: Int -> PatternT attr -> Doc #

pprList :: [PatternT attr] -> Doc #

Pretty u => Pretty (TypeBase Rank u) Source # 
Instance details

Methods

ppr :: TypeBase Rank u -> Doc #

pprPrec :: Int -> TypeBase Rank u -> Doc #

pprList :: [TypeBase Rank u] -> Doc #

Pretty u => Pretty (TypeBase ExtShape u) Source # 
Instance details

Pretty u => Pretty (TypeBase Shape u) Source # 
Instance details

Methods

ppr :: TypeBase Shape u -> Doc #

pprPrec :: Int -> TypeBase Shape u -> Doc #

pprList :: [TypeBase Shape u] -> Doc #