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

Safe Haskell | Safe-Inferred
Language | GHC2021

Futhark.IR.Pretty

Contents

- Orphan instances

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

- prettyTuple :: Pretty a => [a] -> Text
- prettyTupleLines :: Pretty a => [a] -> Text
- prettyString :: Pretty a => a -> String
- class (RepTypes rep, Pretty (RetType rep), Pretty (BranchType rep), Pretty (FParamInfo rep), Pretty (LParamInfo rep), Pretty (LetDec rep), Pretty (Op rep)) => PrettyRep rep where
  - ppExpDec :: ExpDec rep -> Exp rep -> Maybe (Doc a)

# 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 Methods ppExpDec :: ExpDec GPUMem -> Exp GPUMem -> Maybe (Doc a) Source #
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 Methods ppExpDec :: ExpDec SeqMem -> Exp SeqMem -> Maybe (Doc a) Source #
(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 Source # prettyList :: [BasicOp] -> Doc ann Source #
Pretty EntryParam Source # |
Instance details Methods pretty :: EntryParam -> Doc ann Source # prettyList :: [EntryParam] -> Doc ann Source #
Pretty EntryResult Source # |
Instance details Methods pretty :: EntryResult -> Doc ann Source # prettyList :: [EntryResult] -> Doc ann Source #
Pretty SubExpRes Source # |
Instance details Methods pretty :: SubExpRes -> Doc ann Source # prettyList :: [SubExpRes] -> Doc ann Source #
Pretty Attr Source # |
Instance details Methods pretty :: Attr -> Doc ann Source # prettyList :: [Attr] -> Doc ann Source #
Pretty Attrs Source # |
Instance details Methods pretty :: Attrs -> Doc ann Source # prettyList :: [Attrs] -> Doc ann Source #
Pretty Certs Source # |
Instance details Methods pretty :: Certs -> Doc ann Source # prettyList :: [Certs] -> Doc ann Source #
Pretty Commutativity Source # |
Instance details Methods pretty :: Commutativity -> Doc ann Source # prettyList :: [Commutativity] -> Doc ann Source #
Pretty EntryPointType Source # |
Instance details Methods pretty :: EntryPointType -> Doc ann Source # prettyList :: [EntryPointType] -> Doc ann Source #
Pretty Ident Source # |
Instance details Methods pretty :: Ident -> Doc ann Source # prettyList :: [Ident] -> Doc ann Source #
Pretty OpaqueType Source # |
Instance details Methods pretty :: OpaqueType -> Doc ann Source # prettyList :: [OpaqueType] -> Doc ann Source #
Pretty OpaqueTypes Source # |
Instance details Methods pretty :: OpaqueTypes -> Doc ann Source # prettyList :: [OpaqueTypes] -> Doc ann Source #
Pretty Provenance Source # |
Instance details Methods pretty :: Provenance -> Doc ann Source # prettyList :: [Provenance] -> Doc ann Source #
Pretty Rank Source # |
Instance details Methods pretty :: Rank -> Doc ann Source # prettyList :: [Rank] -> Doc ann Source #
Pretty Signedness Source # |
Instance details Methods pretty :: Signedness -> Doc ann Source # prettyList :: [Signedness] -> Doc ann Source #
Pretty Space Source # |
Instance details Methods pretty :: Space -> Doc ann Source # prettyList :: [Space] -> Doc ann Source #
Pretty SubExp Source # |
Instance details Methods pretty :: SubExp -> Doc ann Source # prettyList :: [SubExp] -> Doc ann Source #
Pretty ValueType Source # |
Instance details Methods pretty :: ValueType -> Doc ann Source # prettyList :: [ValueType] -> Doc ann Source #
Pretty VName Source # |
Instance details Methods pretty :: VName -> Doc ann Source # prettyList :: [VName] -> Doc ann Source #
PrettyRep rep => Pretty (Body rep) Source # |
Instance details Methods pretty :: Body rep -> Doc ann Source # prettyList :: [Body rep] -> Doc ann Source #
PrettyRep rep => Pretty (Case (Body rep)) Source # |
Instance details Methods pretty :: Case (Body rep) -> Doc ann Source # prettyList :: [Case (Body rep)] -> Doc ann Source #
Pretty d => Pretty (DimSplice d) Source # |
Instance details Methods pretty :: DimSplice d -> Doc ann Source # prettyList :: [DimSplice d] -> Doc ann Source #
PrettyRep rep => Pretty (Exp rep) Source # |
Instance details Methods pretty :: Exp rep -> Doc ann Source # prettyList :: [Exp rep] -> Doc ann Source #
PrettyRep rep => Pretty (FunDef rep) Source # |
Instance details Methods pretty :: FunDef rep -> Doc ann Source # prettyList :: [FunDef rep] -> Doc ann Source #
PrettyRep rep => Pretty (Lambda rep) Source # |
Instance details Methods pretty :: Lambda rep -> Doc ann Source # prettyList :: [Lambda rep] -> Doc ann Source #
Pretty d => Pretty (NewShape d) Source # |
Instance details Methods pretty :: NewShape d -> Doc ann Source # prettyList :: [NewShape d] -> Doc ann Source #
Pretty t => Pretty (Pat t) Source # |
Instance details Methods pretty :: Pat t -> Doc ann Source # prettyList :: [Pat t] -> Doc ann Source #
PrettyRep rep => Pretty (Prog rep) Source # |
Instance details Methods pretty :: Prog rep -> Doc ann Source # prettyList :: [Prog rep] -> Doc ann Source #
PrettyRep rep => Pretty (Stm rep) Source # |
Instance details Methods pretty :: Stm rep -> Doc ann Source # prettyList :: [Stm rep] -> Doc ann Source #
Pretty dec => Pretty (StmAux dec) Source # |
Instance details Methods pretty :: StmAux dec -> Doc ann Source # prettyList :: [StmAux dec] -> Doc ann Source #
PrettyRep rep => Pretty (Stms rep) Source # |
Instance details Methods pretty :: Stms rep -> Doc ann Source # prettyList :: [Stms rep] -> Doc ann Source #
Pretty d => Pretty (DimIndex d) Source # |
Instance details Methods pretty :: DimIndex d -> Doc ann Source # prettyList :: [DimIndex d] -> Doc ann Source #
Pretty a => Pretty (ErrorMsg a) Source # |
Instance details Methods pretty :: ErrorMsg a -> Doc ann Source # prettyList :: [ErrorMsg a] -> Doc ann Source #
Pretty a => Pretty (Ext a) Source # |
Instance details Methods pretty :: Ext a -> Doc ann Source # prettyList :: [Ext a] -> Doc ann Source #
Pretty d => Pretty (FlatDimIndex d) Source # |
Instance details Methods pretty :: FlatDimIndex d -> Doc ann Source # prettyList :: [FlatDimIndex d] -> Doc ann Source #
Pretty a => Pretty (FlatSlice a) Source # |
Instance details Methods pretty :: FlatSlice a -> Doc ann Source # prettyList :: [FlatSlice a] -> Doc ann Source #
Pretty t => Pretty (Param t) Source # |
Instance details Methods pretty :: Param t -> Doc ann Source # prettyList :: [Param t] -> Doc ann Source #
Pretty t => Pretty (PatElem t) Source # |
Instance details Methods pretty :: PatElem t -> Doc ann Source # prettyList :: [PatElem t] -> Doc ann Source #
Pretty d => Pretty (ShapeBase d) Source # |
Instance details Methods pretty :: ShapeBase d -> Doc ann Source # prettyList :: [ShapeBase d] -> Doc ann Source #
Pretty a => Pretty (Slice a) Source # |
Instance details Methods pretty :: Slice a -> Doc ann Source # prettyList :: [Slice a] -> Doc ann Source #
Pretty (NoOp rep) Source # |
Instance details Methods pretty :: NoOp rep -> Doc ann Source # prettyList :: [NoOp rep] -> Doc ann Source #
Pretty u => Pretty (TypeBase ExtShape u) Source # |
Instance details Methods pretty :: TypeBase ExtShape u -> Doc ann Source # prettyList :: [TypeBase ExtShape u] -> Doc ann Source #
Pretty u => Pretty (TypeBase Rank u) Source # |
Instance details Methods pretty :: TypeBase Rank u -> Doc ann Source # prettyList :: [TypeBase Rank u] -> Doc ann Source #
Pretty u => Pretty (TypeBase Shape u) Source # |
Instance details Methods pretty :: TypeBase Shape u -> Doc ann Source # prettyList :: [TypeBase Shape u] -> Doc ann Source #