futhark-0.19.7: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Futhark.IR.Pretty

Description

Futhark prettyprinter. This module defines Pretty instances for the AST defined in Futhark.IR.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 (RepTypes rep, Pretty (RetType rep), Pretty (BranchType rep), Pretty (FParamInfo rep), Pretty (LParamInfo rep), Pretty (LetDec rep), Pretty (Op rep)) => PrettyRep rep where Source #

The class of representations whose annotations can be prettyprinted.

Minimal complete definition

Nothing

Methods

ppExpDec :: ExpDec rep -> Exp rep -> Maybe Doc Source #

Instances

Instances details
PrettyRep Seq Source # 
Instance details

Defined in Futhark.IR.Seq

PrettyRep SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

PrettyRep SeqMem Source # 
Instance details

Defined in Futhark.IR.SeqMem

PrettyRep MCMem Source # 
Instance details

Defined in Futhark.IR.MCMem

PrettyRep MC Source # 
Instance details

Defined in Futhark.IR.MC

Methods

ppExpDec :: ExpDec MC -> Exp MC -> Maybe Doc Source #

PrettyRep GPU Source # 
Instance details

Defined in Futhark.IR.GPU

PrettyRep GPUMem Source # 
Instance details

Defined in Futhark.IR.GPUMem

(ASTRep rep, CanBeAliased (Op rep)) => PrettyRep (Aliases rep) Source # 
Instance details

Defined in Futhark.IR.Aliases

Methods

ppExpDec :: ExpDec (Aliases rep) -> Exp (Aliases rep) -> Maybe Doc Source #

(PrettyRep rep, CanBeWise (Op rep)) => PrettyRep (Wise rep) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

Methods

ppExpDec :: ExpDec (Wise rep) -> Exp (Wise rep) -> Maybe Doc Source #

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

Like prettyTuple, but produces a Doc.

Orphan instances

Pretty VName Source # 
Instance details

Methods

ppr :: VName -> Doc #

pprPrec :: Int -> VName -> Doc #

pprList :: [VName] -> Doc #

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 Commutativity Source # 
Instance details

Pretty EntryPointType Source # 
Instance details

Pretty BasicOp Source # 
Instance details

Methods

ppr :: BasicOp -> Doc #

pprPrec :: Int -> BasicOp -> Doc #

pprList :: [BasicOp] -> Doc #

Pretty Attr Source # 
Instance details

Methods

ppr :: Attr -> Doc #

pprPrec :: Int -> Attr -> Doc #

pprList :: [Attr] -> Doc #

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

Methods

ppr :: ErrorMsg a -> Doc #

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

pprList :: [ErrorMsg a] -> Doc #

Pretty t => Pretty (PatElemT t) Source # 
Instance details

Methods

ppr :: PatElemT t -> Doc #

pprPrec :: Int -> PatElemT t -> Doc #

pprList :: [PatElemT t] -> Doc #

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

Methods

ppr :: DimIndex d -> Doc #

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

pprList :: [DimIndex d] -> Doc #

Pretty t => Pretty (Param t) Source # 
Instance details

Methods

ppr :: Param t -> Doc #

pprPrec :: Int -> Param t -> Doc #

pprList :: [Param t] -> Doc #

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

Methods

ppr :: Ext a -> Doc #

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

pprList :: [Ext a] -> Doc #

PrettyRep rep => Pretty (Prog rep) Source # 
Instance details

Methods

ppr :: Prog rep -> Doc #

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

pprList :: [Prog rep] -> Doc #

PrettyRep rep => Pretty (FunDef rep) Source # 
Instance details

Methods

ppr :: FunDef rep -> Doc #

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

pprList :: [FunDef rep] -> Doc #

PrettyRep rep => Pretty (Lambda rep) Source # 
Instance details

Methods

ppr :: Lambda rep -> Doc #

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

pprList :: [Lambda rep] -> Doc #

PrettyRep rep => Pretty (Exp rep) Source # 
Instance details

Methods

ppr :: Exp rep -> Doc #

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

pprList :: [Exp rep] -> Doc #

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

Methods

ppr :: DimChange d -> Doc #

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

pprList :: [DimChange d] -> Doc #

PrettyRep rep => Pretty (Body rep) Source # 
Instance details

Methods

ppr :: Body rep -> Doc #

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

pprList :: [Body rep] -> Doc #

PrettyRep rep => Pretty (Stms rep) Source # 
Instance details

Methods

ppr :: Stms rep -> Doc #

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

pprList :: [Stms rep] -> Doc #

PrettyRep rep => Pretty (Stm rep) Source # 
Instance details

Methods

ppr :: Stm rep -> Doc #

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

pprList :: [Stm rep] -> Doc #

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

Methods

ppr :: PatternT dec -> Doc #

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

pprList :: [PatternT dec] -> 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 #