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

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] -> Text Source #

Prettyprint a list enclosed in curly braces.

prettyTupleLines :: Pretty a => [a] -> Text Source #

Like prettyTuple, but put a linebreak after every element.

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

Prettyprint a value to a String, appropriately wrapped.

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 a) Source #

Instances

Instances details
PrettyRep GPU Source # 
Instance details

Defined in Futhark.IR.GPU

Methods

ppExpDec :: ExpDec GPU -> Exp GPU -> Maybe (Doc a) Source #

PrettyRep GPUMem Source # 
Instance details

Defined in Futhark.IR.GPUMem

PrettyRep MC Source # 
Instance details

Defined in Futhark.IR.MC

Methods

ppExpDec :: ExpDec MC -> Exp MC -> Maybe (Doc a) Source #

PrettyRep MCMem Source # 
Instance details

Defined in Futhark.IR.MCMem

Methods

ppExpDec :: ExpDec MCMem -> Exp MCMem -> Maybe (Doc a) Source #

PrettyRep SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

Methods

ppExpDec :: ExpDec SOACS -> Exp SOACS -> Maybe (Doc a) Source #

PrettyRep Seq Source # 
Instance details

Defined in Futhark.IR.Seq

Methods

ppExpDec :: ExpDec Seq -> Exp Seq -> Maybe (Doc a) Source #

PrettyRep SeqMem Source # 
Instance details

Defined in Futhark.IR.SeqMem

(ASTRep rep, AliasedOp (OpC rep), ASTConstraints (OpC rep (Aliases rep))) => PrettyRep (Aliases rep) Source # 
Instance details

Defined in Futhark.IR.Aliases

Methods

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

(Informing rep, Pretty (OpC rep (Wise rep))) => PrettyRep (Wise rep) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

Methods

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

Orphan instances

Pretty BasicOp Source # 
Instance details

Methods

pretty :: BasicOp -> Doc ann #

prettyList :: [BasicOp] -> Doc ann #

Pretty EntryParam Source # 
Instance details

Methods

pretty :: EntryParam -> Doc ann #

prettyList :: [EntryParam] -> Doc ann #

Pretty EntryResult Source # 
Instance details

Methods

pretty :: EntryResult -> Doc ann #

prettyList :: [EntryResult] -> Doc ann #

Pretty SubExpRes Source # 
Instance details

Methods

pretty :: SubExpRes -> Doc ann #

prettyList :: [SubExpRes] -> Doc ann #

Pretty Attr Source # 
Instance details

Methods

pretty :: Attr -> Doc ann #

prettyList :: [Attr] -> Doc ann #

Pretty Attrs Source # 
Instance details

Methods

pretty :: Attrs -> Doc ann #

prettyList :: [Attrs] -> Doc ann #

Pretty Certs Source # 
Instance details

Methods

pretty :: Certs -> Doc ann #

prettyList :: [Certs] -> Doc ann #

Pretty Commutativity Source # 
Instance details

Methods

pretty :: Commutativity -> Doc ann #

prettyList :: [Commutativity] -> Doc ann #

Pretty EntryPointType Source # 
Instance details

Methods

pretty :: EntryPointType -> Doc ann #

prettyList :: [EntryPointType] -> Doc ann #

Pretty ExtShape Source # 
Instance details

Methods

pretty :: ExtShape -> Doc ann #

prettyList :: [ExtShape] -> Doc ann #

Pretty Ident Source # 
Instance details

Methods

pretty :: Ident -> Doc ann #

prettyList :: [Ident] -> Doc ann #

Pretty OpaqueType Source # 
Instance details

Methods

pretty :: OpaqueType -> Doc ann #

prettyList :: [OpaqueType] -> Doc ann #

Pretty OpaqueTypes Source # 
Instance details

Methods

pretty :: OpaqueTypes -> Doc ann #

prettyList :: [OpaqueTypes] -> Doc ann #

Pretty Rank Source # 
Instance details

Methods

pretty :: Rank -> Doc ann #

prettyList :: [Rank] -> Doc ann #

Pretty Shape Source # 
Instance details

Methods

pretty :: Shape -> Doc ann #

prettyList :: [Shape] -> Doc ann #

Pretty Signedness Source # 
Instance details

Methods

pretty :: Signedness -> Doc ann #

prettyList :: [Signedness] -> Doc ann #

Pretty Space Source # 
Instance details

Methods

pretty :: Space -> Doc ann #

prettyList :: [Space] -> Doc ann #

Pretty SubExp Source # 
Instance details

Methods

pretty :: SubExp -> Doc ann #

prettyList :: [SubExp] -> Doc ann #

Pretty ValueType Source # 
Instance details

Methods

pretty :: ValueType -> Doc ann #

prettyList :: [ValueType] -> Doc ann #

Pretty VName Source # 
Instance details

Methods

pretty :: VName -> Doc ann #

prettyList :: [VName] -> Doc ann #

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

Methods

pretty :: Body rep -> Doc ann #

prettyList :: [Body rep] -> Doc ann #

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

Methods

pretty :: Case (Body rep) -> Doc ann #

prettyList :: [Case (Body rep)] -> Doc ann #

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

Methods

pretty :: Exp rep -> Doc ann #

prettyList :: [Exp rep] -> Doc ann #

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

Methods

pretty :: FunDef rep -> Doc ann #

prettyList :: [FunDef rep] -> Doc ann #

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

Methods

pretty :: Lambda rep -> Doc ann #

prettyList :: [Lambda rep] -> Doc ann #

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

Methods

pretty :: Pat t -> Doc ann #

prettyList :: [Pat t] -> Doc ann #

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

Methods

pretty :: Prog rep -> Doc ann #

prettyList :: [Prog rep] -> Doc ann #

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

Methods

pretty :: Stm rep -> Doc ann #

prettyList :: [Stm rep] -> Doc ann #

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

Methods

pretty :: Stms rep -> Doc ann #

prettyList :: [Stms rep] -> Doc ann #

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

Methods

pretty :: DimIndex d -> Doc ann #

prettyList :: [DimIndex d] -> Doc ann #

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

Methods

pretty :: ErrorMsg a -> Doc ann #

prettyList :: [ErrorMsg a] -> Doc ann #

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

Methods

pretty :: Ext a -> Doc ann #

prettyList :: [Ext a] -> Doc ann #

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

Methods

pretty :: FlatDimIndex d -> Doc ann #

prettyList :: [FlatDimIndex d] -> Doc ann #

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

Methods

pretty :: FlatSlice a -> Doc ann #

prettyList :: [FlatSlice a] -> Doc ann #

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

Methods

pretty :: Param t -> Doc ann #

prettyList :: [Param t] -> Doc ann #

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

Methods

pretty :: PatElem t -> Doc ann #

prettyList :: [PatElem t] -> Doc ann #

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

Methods

pretty :: Slice a -> Doc ann #

prettyList :: [Slice a] -> Doc ann #

Pretty (NoOp rep) Source # 
Instance details

Methods

pretty :: NoOp rep -> Doc ann #

prettyList :: [NoOp rep] -> Doc ann #

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

Methods

pretty :: TypeBase ExtShape u -> Doc ann #

prettyList :: [TypeBase ExtShape u] -> Doc ann #

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

Methods

pretty :: TypeBase Rank u -> Doc ann #

prettyList :: [TypeBase Rank u] -> Doc ann #

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

Methods

pretty :: TypeBase Shape u -> Doc ann #

prettyList :: [TypeBase Shape u] -> Doc ann #