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

Futhark.IR.Syntax

Description

Definition of the Futhark core language IR

For actually constructing ASTs, see Futhark.Construct.

Types and values

The core language type system is much more restricted than the core language. This is a theme that repeats often. The only types that are supported in the core language are various primitive types PrimType which can be combined in arrays (ignore Mem and Acc for now). Types are represented as TypeBase, which is parameterised by the shape of the array and whether we keep uniqueness information. The Type alias, which is the most commonly used, uses Shape and NoUniqueness.

This means that the records, tuples, and sum types of the source language are represented merely as collections of primitives and arrays. This is implemented in Futhark.Internalise, but the specifics are not important for writing passes on the core language. What is important is that many constructs that conceptually return tuples instead return multiple values. This is not merely syntactic sugar for a tuple: each of those values are eventually bound to distinct variables. The prettyprinter for the IR will typically print such collections of values or types in curly braces.

The system of primitive types is interesting in itself. See Language.Futhark.Primitive.

Overall AST design

Internally, the Futhark compiler core intermediate representation resembles a traditional compiler for an imperative language more than it resembles, say, a Haskell or ML compiler. All functions are monomorphic (except for sizes), first-order, and defined at the top level. Notably, the IR does not use continuation-passing style (CPS) at any time. Instead it uses Administrative Normal Form (ANF), where all subexpressions SubExp are either constants PrimValue or variables VName. Variables are represented as a human-readable Name (which doesn't matter to the compiler) as well as a numeric tag, which is what the compiler actually looks at. All variable names when prettyprinted are of the form foo_123. Function names are just Names, though.

The body of a function (FunDef) is a Body, which consists of a sequence of statements (Stms) and a Result. Execution of a Body consists of executing all of the statements, then returning the values of the variables indicated by the result.

A statement (Stm) consists of a Pat alongside an expression Exp. A pattern is a sequence of name/type pairs.

For example, the source language expression let z = x + y - 1 in z would in the core language be represented (in prettyprinted form) as something like:

let {a_12} = x_10 + y_11
let {b_13} = a_12 - 1
in {b_13}

Representations

Most AST types (Stm, Exp, Prog, etc) are parameterised by a type parameter rep. The representation specifies how to fill out various polymorphic parts of the AST. For example, Exp has a constructor Op whose payload depends on rep, via the use of a type family called Op (a kind of type-level function) which is applied to the rep. The SOACS representation (Futhark.IR.SOACS) thus uses a rep called SOACS, and defines that Op SOACS is a SOAC, while the Kernels representation (Futhark.IR.Kernels) defines Op Kernels as some kind of kernel construct. Similarly, various other decorations (e.g. what information we store in a PatElem) are also type families.

The full list of possible decorations is defined as part of the type class RepTypes (although other type families are also used elsewhere in the compiler on an ad hoc basis).

Essentially, the rep type parameter functions as a kind of proxy, saving us from having to parameterise the AST type with all the different forms of decorations that we desire (it would easily become a type with a dozen type parameters).

Some AST elements (such as Pat) do not take a rep type parameter, but instead immediately the single type of decoration that they contain. We only use the more complicated machinery when needed.

Defining a new representation (or rep) thus requires you to define an empty datatype and implement a handful of type class instances for it. See the source of Futhark.IR.Seq for what is likely the simplest example.

Synopsis

Documentation

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

Prettyprint a value to a String, appropriately wrapped.

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

Prettyprint a value to a String on a single line.

prettyText :: Pretty a => a -> Text Source #

Prettyprint a value to a Text, appropriately wrapped.

prettyTextOneLine :: Pretty a => a -> Text Source #

Prettyprint a value to a Text on a single line.

class Pretty a #

Minimal complete definition

pretty

Instances

Instances details
Pretty BodyType Source # 
Instance details

Defined in Futhark.Analysis.AccessPattern

Methods

pretty :: BodyType -> Doc ann #

prettyList :: [BodyType] -> Doc ann #

Pretty SegOpName Source # 
Instance details

Defined in Futhark.Analysis.AccessPattern

Methods

pretty :: SegOpName -> Doc ann #

prettyList :: [SegOpName] -> Doc ann #

Pretty VarType Source # 
Instance details

Defined in Futhark.Analysis.AccessPattern

Methods

pretty :: VarType -> Doc ann #

prettyList :: [VarType] -> Doc ann #

Pretty CallGraph Source # 
Instance details

Defined in Futhark.Analysis.CallGraph

Methods

pretty :: CallGraph -> Doc ann #

prettyList :: [CallGraph] -> Doc ann #

Pretty ArrayTransform Source # 
Instance details

Defined in Futhark.Analysis.HORep.SOAC

Methods

pretty :: ArrayTransform -> Doc ann #

prettyList :: [ArrayTransform] -> Doc ann #

Pretty Input Source # 
Instance details

Defined in Futhark.Analysis.HORep.SOAC

Methods

pretty :: Input -> Doc ann #

prettyList :: [Input] -> Doc ann #

Pretty MemAliases Source # 
Instance details

Defined in Futhark.Analysis.MemAlias

Methods

pretty :: MemAliases -> Doc ann #

prettyList :: [MemAliases] -> Doc ann #

Pretty PyArg Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

pretty :: PyArg -> Doc ann #

prettyList :: [PyArg] -> Doc ann #

Pretty PyClassDef Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

pretty :: PyClassDef -> Doc ann #

prettyList :: [PyClassDef] -> Doc ann #

Pretty PyExcept Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

pretty :: PyExcept -> Doc ann #

prettyList :: [PyExcept] -> Doc ann #

Pretty PyExp Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

pretty :: PyExp -> Doc ann #

prettyList :: [PyExp] -> Doc ann #

Pretty PyFunDef Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

pretty :: PyFunDef -> Doc ann #

prettyList :: [PyFunDef] -> Doc ann #

Pretty PyIdx Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

pretty :: PyIdx -> Doc ann #

prettyList :: [PyIdx] -> Doc ann #

Pretty PyProg Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

pretty :: PyProg -> Doc ann #

prettyList :: [PyProg] -> Doc ann #

Pretty PyStmt Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

pretty :: PyStmt -> Doc ann #

prettyList :: [PyStmt] -> Doc ann #

Pretty Arg Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode

Methods

pretty :: Arg -> Doc ann #

prettyList :: [Arg] -> Doc ann #

Pretty ArrayContents Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode

Methods

pretty :: ArrayContents -> Doc ann #

prettyList :: [ArrayContents] -> Doc ann #

Pretty EntryPoint Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode

Methods

pretty :: EntryPoint -> Doc ann #

prettyList :: [EntryPoint] -> Doc ann #

Pretty ExternalValue Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode

Methods

pretty :: ExternalValue -> Doc ann #

prettyList :: [ExternalValue] -> Doc ann #

Pretty Param Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode

Methods

pretty :: Param -> Doc ann #

prettyList :: [Param] -> Doc ann #

Pretty ValueDesc Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode

Methods

pretty :: ValueDesc -> Doc ann #

prettyList :: [ValueDesc] -> Doc ann #

Pretty HostOp Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.GPU

Methods

pretty :: HostOp -> Doc ann #

prettyList :: [HostOp] -> Doc ann #

Pretty Kernel Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.GPU

Methods

pretty :: Kernel -> Doc ann #

prettyList :: [Kernel] -> Doc ann #

Pretty KernelConst Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.GPU

Methods

pretty :: KernelConst -> Doc ann #

prettyList :: [KernelConst] -> Doc ann #

Pretty KernelOp Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.GPU

Methods

pretty :: KernelOp -> Doc ann #

prettyList :: [KernelOp] -> Doc ann #

Pretty KernelUse Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.GPU

Methods

pretty :: KernelUse -> Doc ann #

prettyList :: [KernelUse] -> Doc ann #

Pretty Multicore Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.Multicore

Methods

pretty :: Multicore -> Doc ann #

prettyList :: [Multicore] -> Doc ann #

Pretty ParallelTask Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.Multicore

Methods

pretty :: ParallelTask -> Doc ann #

prettyList :: [ParallelTask] -> Doc ann #

Pretty SchedulerInfo Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.Multicore

Methods

pretty :: SchedulerInfo -> Doc ann #

prettyList :: [SchedulerInfo] -> Doc ann #

Pretty Scheduling Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.Multicore

Methods

pretty :: Scheduling -> Doc ann #

prettyList :: [Scheduling] -> Doc ann #

Pretty OpenCL Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.OpenCL

Methods

pretty :: OpenCL -> Doc ann #

prettyList :: [OpenCL] -> Doc ann #

Pretty Sequential Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode.Sequential

Methods

pretty :: Sequential -> Doc ann #

prettyList :: [Sequential] -> Doc ann #

Pretty DeviceInfo Source # 
Instance details

Defined in Futhark.CodeGen.OpenCL.Heuristics

Methods

pretty :: DeviceInfo -> Doc ann #

prettyList :: [DeviceInfo] -> Doc ann #

Pretty AliasDec Source # 
Instance details

Defined in Futhark.IR.Aliases

Methods

pretty :: AliasDec -> Doc ann #

prettyList :: [AliasDec] -> Doc ann #

Pretty KernelGrid Source # 
Instance details

Defined in Futhark.IR.GPU.Op

Methods

pretty :: KernelGrid -> Doc ann #

prettyList :: [KernelGrid] -> Doc ann #

Pretty SegLevel Source # 
Instance details

Defined in Futhark.IR.GPU.Op

Methods

pretty :: SegLevel -> Doc ann #

prettyList :: [SegLevel] -> Doc ann #

Pretty SegVirt Source # 
Instance details

Defined in Futhark.IR.GPU.Op

Methods

pretty :: SegVirt -> Doc ann #

prettyList :: [SegVirt] -> Doc ann #

Pretty SizeOp Source # 
Instance details

Defined in Futhark.IR.GPU.Op

Methods

pretty :: SizeOp -> Doc ann #

prettyList :: [SizeOp] -> Doc ann #

Pretty SizeClass Source # 
Instance details

Defined in Futhark.IR.GPU.Sizes

Methods

pretty :: SizeClass -> Doc ann #

prettyList :: [SizeClass] -> Doc ann #

Pretty MemBind Source # 
Instance details

Defined in Futhark.IR.Mem

Methods

pretty :: MemBind -> Doc ann #

prettyList :: [MemBind] -> Doc ann #

Pretty MemReturn Source # 
Instance details

Defined in Futhark.IR.Mem

Methods

pretty :: MemReturn -> Doc ann #

prettyList :: [MemReturn] -> Doc ann #

Pretty Names Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

pretty :: Names -> Doc ann #

prettyList :: [Names] -> Doc ann #

Pretty KernelResult Source # 
Instance details

Defined in Futhark.IR.SegOp

Methods

pretty :: KernelResult -> Doc ann #

prettyList :: [KernelResult] -> Doc ann #

Pretty SegSpace Source # 
Instance details

Defined in Futhark.IR.SegOp

Methods

pretty :: SegSpace -> Doc ann #

prettyList :: [SegSpace] -> Doc ann #

Pretty BasicOp Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: BasicOp -> Doc ann #

prettyList :: [BasicOp] -> Doc ann #

Pretty EntryParam Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: EntryParam -> Doc ann #

prettyList :: [EntryParam] -> Doc ann #

Pretty EntryResult Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: EntryResult -> Doc ann #

prettyList :: [EntryResult] -> Doc ann #

Pretty SubExpRes Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: SubExpRes -> Doc ann #

prettyList :: [SubExpRes] -> Doc ann #

Pretty Attr Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: Attr -> Doc ann #

prettyList :: [Attr] -> Doc ann #

Pretty Attrs Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: Attrs -> Doc ann #

prettyList :: [Attrs] -> Doc ann #

Pretty Certs Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: Certs -> Doc ann #

prettyList :: [Certs] -> Doc ann #

Pretty Commutativity Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: Commutativity -> Doc ann #

prettyList :: [Commutativity] -> Doc ann #

Pretty EntryPointType Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: EntryPointType -> Doc ann #

prettyList :: [EntryPointType] -> Doc ann #

Pretty Ident Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: Ident -> Doc ann #

prettyList :: [Ident] -> Doc ann #

Pretty OpaqueType Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: OpaqueType -> Doc ann #

prettyList :: [OpaqueType] -> Doc ann #

Pretty OpaqueTypes Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: OpaqueTypes -> Doc ann #

prettyList :: [OpaqueTypes] -> Doc ann #

Pretty Provenance Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: Provenance -> Doc ann #

prettyList :: [Provenance] -> Doc ann #

Pretty Rank Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: Rank -> Doc ann #

prettyList :: [Rank] -> Doc ann #

Pretty Signedness Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: Signedness -> Doc ann #

prettyList :: [Signedness] -> Doc ann #

Pretty Space Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: Space -> Doc ann #

prettyList :: [Space] -> Doc ann #

Pretty SubExp Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: SubExp -> Doc ann #

prettyList :: [SubExp] -> Doc ann #

Pretty ValueType Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: ValueType -> Doc ann #

prettyList :: [ValueType] -> Doc ann #

Pretty AccessSummary Source # 
Instance details

Defined in Futhark.Optimise.ArrayShortCircuiting.DataStructs

Methods

pretty :: AccessSummary -> Doc ann #

prettyList :: [AccessSummary] -> Doc ann #

Pretty ArrayMemBound Source # 
Instance details

Defined in Futhark.Optimise.ArrayShortCircuiting.DataStructs

Methods

pretty :: ArrayMemBound -> Doc ann #

prettyList :: [ArrayMemBound] -> Doc ann #

Pretty Coalesced Source # 
Instance details

Defined in Futhark.Optimise.ArrayShortCircuiting.DataStructs

Methods

pretty :: Coalesced -> Doc ann #

prettyList :: [Coalesced] -> Doc ann #

Pretty CoalescedKind Source # 
Instance details

Defined in Futhark.Optimise.ArrayShortCircuiting.DataStructs

Methods

pretty :: CoalescedKind -> Doc ann #

prettyList :: [CoalescedKind] -> Doc ann #

Pretty CoalsEntry Source # 
Instance details

Defined in Futhark.Optimise.ArrayShortCircuiting.DataStructs

Methods

pretty :: CoalsEntry -> Doc ann #

prettyList :: [CoalsEntry] -> Doc ann #

Pretty CoalsTab Source # 
Instance details

Defined in Futhark.Optimise.ArrayShortCircuiting.DataStructs

Methods

pretty :: CoalsTab -> Doc ann #

prettyList :: [CoalsTab] -> Doc ann #

Pretty MemRefs Source # 
Instance details

Defined in Futhark.Optimise.ArrayShortCircuiting.DataStructs

Methods

pretty :: MemRefs -> Doc ann #

prettyList :: [MemRefs] -> Doc ann #

Pretty VarWisdom Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Rep

Methods

pretty :: VarWisdom -> Doc ann #

prettyList :: [VarWisdom] -> Doc ann #

Pretty Exp Source # 
Instance details

Defined in Futhark.Script

Methods

pretty :: Exp -> Doc ann #

prettyList :: [Exp] -> Doc ann #

Pretty Func Source # 
Instance details

Defined in Futhark.Script

Methods

pretty :: Func -> Doc ann #

prettyList :: [Func] -> Doc ann #

Pretty ScriptValueType Source # 
Instance details

Defined in Futhark.Script

Pretty Name Source # 
Instance details

Defined in Language.Futhark.Core

Methods

pretty :: Name -> Doc ann #

prettyList :: [Name] -> Doc ann #

Pretty NoUniqueness Source # 
Instance details

Defined in Language.Futhark.Core

Methods

pretty :: NoUniqueness -> Doc ann #

prettyList :: [NoUniqueness] -> Doc ann #

Pretty Uniqueness Source # 
Instance details

Defined in Language.Futhark.Core

Methods

pretty :: Uniqueness -> Doc ann #

prettyList :: [Uniqueness] -> Doc ann #

Pretty VName Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

pretty :: VName -> Doc ann #

prettyList :: [VName] -> Doc ann #

Pretty BinOp Source # 
Instance details

Defined in Language.Futhark.Primitive

Methods

pretty :: BinOp -> Doc ann #

prettyList :: [BinOp] -> Doc ann #

Pretty CmpOp Source # 
Instance details

Defined in Language.Futhark.Primitive

Methods

pretty :: CmpOp -> Doc ann #

prettyList :: [CmpOp] -> Doc ann #

Pretty ConvOp Source # 
Instance details

Defined in Language.Futhark.Primitive

Methods

pretty :: ConvOp -> Doc ann #

prettyList :: [ConvOp] -> Doc ann #

Pretty FloatType Source # 
Instance details

Defined in Language.Futhark.Primitive

Methods

pretty :: FloatType -> Doc ann #

prettyList :: [FloatType] -> Doc ann #

Pretty FloatValue Source # 
Instance details

Defined in Language.Futhark.Primitive

Methods

pretty :: FloatValue -> Doc ann #

prettyList :: [FloatValue] -> Doc ann #

Pretty IntType Source # 
Instance details

Defined in Language.Futhark.Primitive

Methods

pretty :: IntType -> Doc ann #

prettyList :: [IntType] -> Doc ann #

Pretty IntValue Source # 
Instance details

Defined in Language.Futhark.Primitive

Methods

pretty :: IntValue -> Doc ann #

prettyList :: [IntValue] -> Doc ann #

Pretty PrimType Source # 
Instance details

Defined in Language.Futhark.Primitive

Methods

pretty :: PrimType -> Doc ann #

prettyList :: [PrimType] -> Doc ann #

Pretty PrimValue Source # 
Instance details

Defined in Language.Futhark.Primitive

Methods

pretty :: PrimValue -> Doc ann #

prettyList :: [PrimValue] -> Doc ann #

Pretty UnOp Source # 
Instance details

Defined in Language.Futhark.Primitive

Methods

pretty :: UnOp -> Doc ann #

prettyList :: [UnOp] -> Doc ann #

Pretty Env Source # 
Instance details

Defined in Language.Futhark.Semantic

Methods

pretty :: Env -> Doc ann #

prettyList :: [Env] -> Doc ann #

Pretty MTy Source # 
Instance details

Defined in Language.Futhark.Semantic

Methods

pretty :: MTy -> Doc ann #

prettyList :: [MTy] -> Doc ann #

Pretty Mod Source # 
Instance details

Defined in Language.Futhark.Semantic

Methods

pretty :: Mod -> Doc ann #

prettyList :: [Mod] -> Doc ann #

Pretty Namespace Source # 
Instance details

Defined in Language.Futhark.Semantic

Methods

pretty :: Namespace -> Doc ann #

prettyList :: [Namespace] -> Doc ann #

Pretty BinOp Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

pretty :: BinOp -> Doc ann #

prettyList :: [BinOp] -> Doc ann #

Pretty Diet Source # 
Instance details

Defined in Language.Futhark.Pretty

Methods

pretty :: Diet -> Doc ann #

prettyList :: [Diet] -> Doc ann #

Pretty Liftedness Source # 
Instance details

Defined in Language.Futhark.Pretty

Methods

pretty :: Liftedness -> Doc ann #

prettyList :: [Liftedness] -> Doc ann #

Pretty PatLit Source # 
Instance details

Defined in Language.Futhark.Pretty

Methods

pretty :: PatLit -> Doc ann #

prettyList :: [PatLit] -> Doc ann #

Pretty PrimType Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

pretty :: PrimType -> Doc ann #

prettyList :: [PrimType] -> Doc ann #

Pretty PrimValue Source # 
Instance details

Defined in Language.Futhark.Pretty

Methods

pretty :: PrimValue -> Doc ann #

prettyList :: [PrimValue] -> Doc ann #

Pretty Notes Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Monad

Methods

pretty :: Notes -> Doc ann #

prettyList :: [Notes] -> Doc ann #

Pretty Checking Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Terms.Monad

Methods

pretty :: Checking -> Doc ann #

prettyList :: [Checking] -> Doc ann #

Pretty BreadCrumbs Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Unify

Methods

pretty :: BreadCrumbs -> Doc ann #

prettyList :: [BreadCrumbs] -> Doc ann #

Pretty Usage Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Unify

Methods

pretty :: Usage -> Doc ann #

prettyList :: [Usage] -> Doc ann #

Pretty Value Source # 
Instance details

Defined in Futhark.Test.Values

Methods

pretty :: Value -> Doc ann #

prettyList :: [Value] -> Doc ann #

Pretty ValueType Source # 
Instance details

Defined in Futhark.Test.Values

Methods

pretty :: ValueType -> Doc ann #

prettyList :: [ValueType] -> Doc ann #

Pretty Void 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Void -> Doc ann #

prettyList :: [Void] -> Doc ann #

Pretty Int16 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Int16 -> Doc ann #

prettyList :: [Int16] -> Doc ann #

Pretty Int32 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Int32 -> Doc ann #

prettyList :: [Int32] -> Doc ann #

Pretty Int64 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Int64 -> Doc ann #

prettyList :: [Int64] -> Doc ann #

Pretty Int8 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Int8 -> Doc ann #

prettyList :: [Int8] -> Doc ann #

Pretty Word16 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Word16 -> Doc ann #

prettyList :: [Word16] -> Doc ann #

Pretty Word32 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Word32 -> Doc ann #

prettyList :: [Word32] -> Doc ann #

Pretty Word64 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Word64 -> Doc ann #

prettyList :: [Word64] -> Doc ann #

Pretty Word8 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Word8 -> Doc ann #

prettyList :: [Word8] -> Doc ann #

Pretty Half Source # 
Instance details

Defined in Futhark.Util.Pretty

Methods

pretty :: Half -> Doc ann #

prettyList :: [Half] -> Doc ann #

Pretty Text 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Text -> Doc ann #

prettyList :: [Text] -> Doc ann #

Pretty Text 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Text -> Doc ann #

prettyList :: [Text] -> Doc ann #

Pretty Integer 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Integer -> Doc ann #

prettyList :: [Integer] -> Doc ann #

Pretty Natural 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Natural -> Doc ann #

prettyList :: [Natural] -> Doc ann #

Pretty () 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: () -> Doc ann #

prettyList :: [()] -> Doc ann #

Pretty Bool 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Bool -> Doc ann #

prettyList :: [Bool] -> Doc ann #

Pretty Char 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Char -> Doc ann #

prettyList :: [Char] -> Doc ann #

Pretty Double 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Double -> Doc ann #

prettyList :: [Double] -> Doc ann #

Pretty Float 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Float -> Doc ann #

prettyList :: [Float] -> Doc ann #

Pretty Int 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Int -> Doc ann #

prettyList :: [Int] -> Doc ann #

Pretty Word 
Instance details

Defined in Prettyprinter.Internal

Methods

pretty :: Word -> Doc ann #

prettyList :: [Word] -> Doc ann #

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

Defined in Futhark.Analysis.HORep.SOAC

Methods

pretty :: SOAC rep -> Doc ann #

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

Pretty v => Pretty (PrimExp v) Source # 
Instance details

Defined in Futhark.Analysis.PrimExp

Methods

pretty :: PrimExp v -> Doc ann #

prettyList :: [PrimExp v] -> Doc ann #

Pretty op => Pretty (Code op) Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode

Methods

pretty :: Code op -> Doc ann #

prettyList :: [Code op] -> Doc ann #

Pretty op => Pretty (Constants op) Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode

Methods

pretty :: Constants op -> Doc ann #

prettyList :: [Constants op] -> Doc ann #

Pretty op => Pretty (Definitions op) Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode

Methods

pretty :: Definitions op -> Doc ann #

prettyList :: [Definitions op] -> Doc ann #

Pretty op => Pretty (FunctionT op) Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode

Methods

pretty :: FunctionT op -> Doc ann #

prettyList :: [FunctionT op] -> Doc ann #

Pretty op => Pretty (Functions op) Source # 
Instance details

Defined in Futhark.CodeGen.ImpCode

Methods

pretty :: Functions op -> Doc ann #

prettyList :: [Functions op] -> Doc ann #

Pretty num => Pretty (LMAD num) Source # 
Instance details

Defined in Futhark.IR.Mem.LMAD

Methods

pretty :: LMAD num -> Doc ann #

prettyList :: [LMAD num] -> Doc ann #

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

Defined in Futhark.IR.SOACS.SOAC

Methods

pretty :: Reduce rep -> Doc ann #

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

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

Defined in Futhark.IR.SOACS.SOAC

Methods

pretty :: SOAC rep -> Doc ann #

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

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

Defined in Futhark.IR.SOACS.SOAC

Methods

pretty :: Scan rep -> Doc ann #

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

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

Defined in Futhark.IR.SegOp

Methods

pretty :: KernelBody rep -> Doc ann #

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

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

Defined in Futhark.IR.SegOp

Methods

pretty :: SegBinOp rep -> Doc ann #

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

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

Defined in Futhark.IR.Pretty

Methods

pretty :: Body rep -> Doc ann #

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

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

Defined in Futhark.IR.Pretty

Methods

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

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

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

Defined in Futhark.IR.Pretty

Methods

pretty :: DimSplice d -> Doc ann #

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

pretty :: FuncIR.Pretty

#

Simplify a sequential program.

AC.html#t:SOAC" title="Futhark.IR.SOACS.SOAC">SOAC trep) Source #

Map a monadic action across the immediate childrex"> Pretty num =>

Defined in Futhark.IR.SegOp

Ea href="#v:typeOf">typeOf :: Param dec -> Futhark.IR.SegOp

#

LMADDim numrea-details-id="i:ic:Pretty:Pretty:132"> Pretty num =>

Defined in Futhark.IR.SegOpp a monadic action across the immediate childrex">Ea href="#v:typeOf">typeOf :: Futhark.IR.SegOp

Defined in Futhark.IR.SegOp

] [SubExpEa href="#v:typVpnst-left"> #