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

Futhark.IR.SOACS

Description

A simple representation with SOACs and nested parallelism.

Synopsis

Documentation

data SOACS Source #

The rep for the basic representation.

Instances

Instances details
RepTypes SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

PrettyRep SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

ASTRep SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

Buildable SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

BuilderOps SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

Checkable SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

CheckableOp SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

LocalScope SOACS InternaliseM Source # 
Instance details

Defined in Futhark.Internalise.Monad

HasScope SOACS InternaliseM Source # 
Instance details

Defined in Futhark.Internalise.Monad

HasScope SOACS (ImpM rep r op) Source # 
Instance details

Defined in Futhark.CodeGen.ImpGen

Methods

lookupType :: VName -> ImpM rep r op Type Source #

lookupInfo :: VName -> ImpM rep r op (NameInfo SOACS) Source #

askScope :: ImpM rep r op (Scope SOACS) Source #

asksScope :: (Scope SOACS -> a) -> ImpM rep r op a Source #

BuilderOps (Wise SOACS) Source # 
Instance details

Defined in Futhark.IR.SOACS.Simplify

HasSOAC (Wise SOACS) Source # 
Instance details

Defined in Futhark.IR.SOACS.Simplify

type LetDec SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

type ExpDec SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

type ExpDec SOACS = ()
type BodyDec SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

type BodyDec SOACS = ()
type FParamInfo SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

type LParamInfo SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

type RetType SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

type BranchType SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

type Op SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

Syntax types

Module re-exports

data Int8 #

8-bit signed integer type

Instances

Instances details
Bounded Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

succ :: Int8 -> Int8 #

pred :: Int8 -> Int8 #

toEnum :: Int -> Int8 #

fromEnum :: Int8 -> Int #

enumFrom :: Int8 -> [Int8] #

enumFromThen :: Int8 -> Int8 -> [Int8] #

enumFromTo :: Int8 -> Int8 -> [Int8] #

enumFromThenTo :: Int8 -> Int8 -> Int8 -> [Int8] #

Eq Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

(==) :: Int8 -> Int8 -> Bool #

(/=) :: Int8 -> Int8 -> Bool #

Integral Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

quot :: Int8 -> Int8 -> Int8 #

rem :: Int8 -> Int8 -> Int8 #

div :: Int8 -> Int8 -> Int8 #

mod :: Int8 -> Int8 -> Int8 #

quotRem :: Int8 -> Int8 -> (Int8, Int8) #

divMod :: Int8 -> Int8 -> (Int8, Int8) #

toInteger :: Int8 -> Integer #

Num Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

(+) :: Int8 -> Int8 -> Int8 #

(-) :: Int8 -> Int8 -> Int8 #

(*) :: Int8 -> Int8 -> Int8 #

negate :: Int8 -> Int8 #

abs :: Int8 -> Int8 #

signum :: Int8 -> Int8 #

fromInteger :: Integer -> Int8 #

Ord Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int8 -> Int8 -> Ordering #

(<) :: Int8 -> Int8 -> Bool #

(<=) :: Int8 -> Int8 -> Bool #

(>) :: Int8 -> Int8 -> Bool #

(>=) :: Int8 -> Int8 -> Bool #

max :: Int8 -> Int8 -> Int8 #

min :: Int8 -> Int8 -> Int8 #

Read Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int8 -> Rational #

Show Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int8 -> ShowS #

show :: Int8 -> String #

showList :: [Int8] -> ShowS #

Ix Int8

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

range :: (Int8, Int8) -> [Int8] #

index :: (Int8, Int8) -> Int8 -> Int #

unsafeIndex :: (Int8, Int8) -> Int8 -> Int #

inRange :: (Int8, Int8) -> Int8 -> Bool #

rangeSize :: (Int8, Int8) -> Int #

unsafeRangeSize :: (Int8, Int8) -> Int #

Hashable Int8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int8 -> Int #

hash :: Int8 -> Int #

ToJSON Int8 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Int8 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON Int8 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Int8 
Instance details

Defined in Data.Aeson.Types.FromJSON

PrintfArg Int8

Since: base-2.1

Instance details

Defined in Text.Printf

Storable Int8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int8 -> Int #

alignment :: Int8 -> Int #

peekElemOff :: Ptr Int8 -> Int -> IO Int8 #

pokeElemOff :: Ptr Int8 -> Int -> Int8 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int8 #

pokeByteOff :: Ptr b -> Int -> Int8 -> IO () #

peek :: Ptr Int8 -> IO Int8 #

poke :: Ptr Int8 -> Int8 -> IO () #

Bits Int8

Since: base-2.1

Instance details

Defined in GHC.Int

FiniteBits Int8

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

Binary Int8 
Instance details

Defined in Data.Binary.Class

Methods

put :: Int8 -> Put #

get :: Get Int8 #

putList :: [Int8] -> Put #

NFData Int8 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int8 -> () #

GetValue Int8 
Instance details

Defined in Futhark.Data

Methods

getValue :: Value -> Maybe Int8 #

PutValue Int8 
Instance details

Defined in Futhark.Data

Methods

putValue :: Int8 -> Maybe Value #

ToConst Int8 
Instance details

Defined in Language.C.Quote.Base

Methods

toConst :: Int8 -> SrcLoc -> Const #

ToExp Int8 
Instance details

Defined in Language.C.Quote.Base

Methods

toExp :: Int8 -> SrcLoc -> Exp #

Pretty Int8 
Instance details

Defined in Text.PrettyPrint.Mainland.Class

Methods

ppr :: Int8 -> Doc #

pprPrec :: Int -> Int8 -> Doc #

pprList :: [Int8] -> Doc #

Prim Int8 
Instance details

Defined in Data.Primitive.Types

Random Int8 
Instance details

Defined in System.Random

Methods

randomR :: RandomGen g => (Int8, Int8) -> g -> (Int8, g) #

random :: RandomGen g => g -> (Int8, g) #

randomRs :: RandomGen g => (Int8, Int8) -> g -> [Int8] #

randoms :: RandomGen g => g -> [Int8] #

Uniform Int8 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int8 #

UniformRange Int8 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int8, Int8) -> g -> m Int8 #

Unbox Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

IsValue Int8 Source # 
Instance details

Defined in Futhark.IR.Prop.Constants

Methods

value :: Int8 -> PrimValue Source #

IntExp Int8 Source # 
Instance details

Defined in Futhark.Analysis.PrimExp

NumExp Int8 Source # 
Instance details

Defined in Futhark.Analysis.PrimExp

IsPrimValue Int8 Source # 
Instance details

Defined in Language.Futhark.Syntax

Lift Int8 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Int8 -> Q Exp #

liftTyped :: Int8 -> Q (TExp Int8) #

IArray UArray Int8 
Instance details

Defined in Data.Array.Base

Methods

bounds :: Ix i => UArray i Int8 -> (i, i) #

numElements :: Ix i => UArray i Int8 -> Int

unsafeArray :: Ix i => (i, i) -> [(Int, Int8)] -> UArray i Int8

unsafeAt :: Ix i => UArray i Int8 -> Int -> Int8

unsafeReplace :: Ix i => UArray i Int8 -> [(Int, Int8)] -> UArray i Int8

unsafeAccum :: Ix i => (Int8 -> e' -> Int8) -> UArray i Int8 -> [(Int, e')] -> UArray i Int8

unsafeAccumArray :: Ix i => (Int8 -> e' -> Int8) -> Int8 -> (i, i) -> [(Int, e')] -> UArray i Int8

Vector Vector Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

MArray (STUArray s) Int8 (ST s) 
Instance details

Defined in Data.Array.Base

Methods

getBounds :: Ix i => STUArray s i Int8 -> ST s (i, i) #

getNumElements :: Ix i => STUArray s i Int8 -> ST s Int

newArray :: Ix i => (i, i) -> Int8 -> ST s (STUArray s i Int8) #

newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Int8) #

unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Int8)

unsafeRead :: Ix i => STUArray s i Int8 -> Int -> ST s Int8

unsafeWrite :: Ix i => STUArray s i Int8 -> Int -> Int8 -> ST s ()

newtype Vector Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int8 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int8 = MV_Int8 (MVector s Int8)

data Int16 #

16-bit signed integer type

Instances

Instances details
Bounded Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

(==) :: Int16 -> Int16 -> Bool #

(/=) :: Int16 -> Int16 -> Bool #

Integral Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int16 -> Int16 -> Ordering #

(<) :: Int16 -> Int16 -> Bool #

(<=) :: Int16 -> Int16 -> Bool #

(>) :: Int16 -> Int16 -> Bool #

(>=) :: Int16 -> Int16 -> Bool #

max :: Int16 -> Int16 -> Int16 #

min :: Int16 -> Int16 -> Int16 #

Read Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int16 -> Rational #

Show Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int16 -> ShowS #

show :: Int16 -> String #

showList :: [Int16] -> ShowS #

Ix Int16

Since: base-2.1

Instance details

Defined in GHC.Int

Hashable Int16 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int16 -> Int #

hash :: Int16 -> Int #

ToJSON Int16 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Int16 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON Int16 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Int16 
Instance details

Defined in Data.Aeson.Types.FromJSON

PrintfArg Int16

Since: base-2.1

Instance details

Defined in Text.Printf

Storable Int16

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int16 -> Int #

alignment :: Int16 -> Int #

peekElemOff :: Ptr Int16 -> Int -> IO Int16 #

pokeElemOff :: Ptr Int16 -> Int -> Int16 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int16 #

pokeByteOff :: Ptr b -> Int -> Int16 -> IO () #

peek :: Ptr Int16 -> IO Int16 #

poke :: Ptr Int16 -> Int16 -> IO () #

Bits Int16

Since: base-2.1

Instance details

Defined in GHC.Int

FiniteBits Int16

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

Binary Int16 
Instance details

Defined in Data.Binary.Class

Methods

put :: Int16 -> Put #

get :: Get Int16 #

putList :: [Int16] -> Put #

NFData Int16 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int16 -> () #

GetValue Int16 
Instance details

Defined in Futhark.Data

Methods

getValue :: Value -> Maybe Int16 #

PutValue Int16 
Instance details

Defined in Futhark.Data

Methods

putValue :: Int16 -> Maybe Value #

ToConst Int16 
Instance details

Defined in Language.C.Quote.Base

Methods

toConst :: Int16 -> SrcLoc -> Const #

ToExp Int16 
Instance details

Defined in Language.C.Quote.Base

Methods

toExp :: Int16 -> SrcLoc -> Exp #

Pretty Int16 
Instance details

Defined in Text.PrettyPrint.Mainland.Class

Methods

ppr :: Int16 -> Doc #

pprPrec :: Int -> Int16 -> Doc #

pprList :: [Int16] -> Doc #

Prim Int16 
Instance details

Defined in Data.Primitive.Types

Random Int16 
Instance details

Defined in System.Random

Methods

randomR :: RandomGen g => (Int16, Int16) -> g -> (Int16, g) #

random :: RandomGen g => g -> (Int16, g) #

randomRs :: RandomGen g => (Int16, Int16) -> g -> [Int16] #

randoms :: RandomGen g => g -> [Int16] #

Uniform Int16 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int16 #

UniformRange Int16 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int16, Int16) -> g -> m Int16 #

Unbox Int16 
Instance details

Defined in Data.Vector.Unboxed.Base

IsValue Int16 Source # 
Instance details

Defined in Futhark.IR.Prop.Constants

IntExp Int16 Source # 
Instance details

Defined in Futhark.Analysis.PrimExp

NumExp Int16 Source # 
Instance details

Defined in Futhark.Analysis.PrimExp

IsPrimValue Int16 Source # 
Instance details

Defined in Language.Futhark.Syntax

Lift Int16 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Int16 -> Q Exp #

liftTyped :: Int16 -> Q (TExp Int16) #

IArray UArray Int16 
Instance details

Defined in Data.Array.Base

Methods

bounds :: Ix i => UArray i Int16 -> (i, i) #

numElements :: Ix i => UArray i Int16 -> Int

unsafeArray :: Ix i => (i, i) -> [(Int, Int16)] -> UArray i Int16

unsafeAt :: Ix i => UArray i Int16 -> Int -> Int16

unsafeReplace :: Ix i => UArray i Int16 -> [(Int, Int16)] -> UArray i Int16

unsafeAccum :: Ix i => (Int16 -> e' -> Int16) -> UArray i Int16 -> [(Int, e')] -> UArray i Int16

unsafeAccumArray :: Ix i => (Int16 -> e' -> Int16) -> Int16 -> (i, i) -> [(Int, e')] -> UArray i Int16

Vector Vector Int16 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Int16 
Instance details

Defined in Data.Vector.Unboxed.Base

MArray (STUArray s) Int16 (ST s) 
Instance details

Defined in Data.Array.Base

Methods

getBounds :: Ix i => STUArray s i Int16 -> ST s (i, i) #

getNumElements :: Ix i => STUArray s i Int16 -> ST s Int

newArray :: Ix i => (i, i) -> Int16 -> ST s (STUArray s i Int16) #

newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Int16) #

unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Int16)

unsafeRead :: Ix i => STUArray s i Int16 -> Int -> ST s Int16

unsafeWrite :: Ix i => STUArray s i Int16 -> Int -> Int16 -> ST s ()

newtype Vector Int16 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int16 
Instance details

Defined in Data.Vector.Unboxed.Base

data Int32 #

32-bit signed integer type

Instances

Instances details
Bounded Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

(==) :: Int32 -> Int32 -> Bool #

(/=) :: Int32 -> Int32 -> Bool #

Integral Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int32 -> Int32 -> Ordering #

(<) :: Int32 -> Int32 -> Bool #

(<=) :: Int32 -> Int32 -> Bool #

(>) :: Int32 -> Int32 -> Bool #

(>=) :: Int32 -> Int32 -> Bool #

max :: Int32 -> Int32 -> Int32 #

min :: Int32 -> Int32 -> Int32 #

Read Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int32 -> Rational #

Show Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int32 -> ShowS #

show :: Int32 -> String #

showList :: [Int32] -> ShowS #

Ix Int32

Since: base-2.1

Instance details

Defined in GHC.Int

Hashable Int32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int32 -> Int #

hash :: Int32 -> Int #

ToJSON Int32 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Int32 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON Int32 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Int32 
Instance details

Defined in Data.Aeson.Types.FromJSON

PrintfArg Int32

Since: base-2.1

Instance details

Defined in Text.Printf

Storable Int32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int32 -> Int #

alignment :: Int32 -> Int #

peekElemOff :: Ptr Int32 -> Int -> IO Int32 #

pokeElemOff :: Ptr Int32 -> Int -> Int32 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int32 #

pokeByteOff :: Ptr b -> Int -> Int32 -> IO () #

peek :: Ptr Int32 -> IO Int32 #

poke :: Ptr Int32 -> Int32 -> IO () #

Bits Int32

Since: base-2.1

Instance details

Defined in GHC.Int

FiniteBits Int32

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

Binary Int32 
Instance details

Defined in Data.Binary.Class

Methods

put :: Int32 -> Put #

get :: Get Int32 #

putList :: [Int32] -> Put #

ToValue Int32 
Instance details

Defined in Text.Blaze

ToMarkup Int32 
Instance details

Defined in Text.Blaze

NFData Int32 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int32 -> () #

GetValue Int32 
Instance details

Defined in Futhark.Data

Methods

getValue :: Value -> Maybe Int32 #

PutValue Int32 
Instance details

Defined in Futhark.Data

Methods

putValue :: Int32 -> Maybe Value #

ToConst Int32 
Instance details

Defined in Language.C.Quote.Base

Methods

toConst :: Int32 -> SrcLoc -> Const #

ToExp Int32 
Instance details

Defined in Language.C.Quote.Base

Methods

toExp :: Int32 -> SrcLoc -> Exp #

Pretty Int32 
Instance details

Defined in Text.PrettyPrint.Mainland.Class

Methods

ppr :: Int32 -> Doc #

pprPrec :: Int -> Int32 -> Doc #

pprList :: [Int32] -> Doc #

Prim Int32 
Instance details

Defined in Data.Primitive.Types

Random Int32 
Instance details

Defined in System.Random

Methods

randomR :: RandomGen g => (Int32, Int32) -> g -> (Int32, g) #

random :: RandomGen g => g -> (Int32, g) #

randomRs :: RandomGen g => (Int32, Int32) -> g -> [Int32] #

randoms :: RandomGen g => g -> [Int32] #

Uniform Int32 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int32 #

UniformRange Int32 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int32, Int32) -> g -> m Int32 #

Unbox Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

IsValue Int32 Source # 
Instance details

Defined in Futhark.IR.Prop.Constants

IntExp Int32 Source # 
Instance details

Defined in Futhark.Analysis.PrimExp

NumExp Int32 Source # 
Instance details

Defined in Futhark.Analysis.PrimExp

IsPrimValue Int32 Source # 
Instance details

Defined in Language.Futhark.Syntax

Lift Int32 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Int32 -> Q Exp #

liftTyped :: Int32 -> Q (TExp Int32) #

IArray UArray Int32 
Instance details

Defined in Data.Array.Base

Methods

bounds :: Ix i => UArray i Int32 -> (i, i) #

numElements :: Ix i => UArray i Int32 -> Int

unsafeArray :: Ix i => (i, i) -> [(Int, Int32)] -> UArray i Int32

unsafeAt :: Ix i => UArray i Int32 -> Int -> Int32

unsafeReplace :: Ix i => UArray i Int32 -> [(Int, Int32)] -> UArray i Int32

unsafeAccum :: Ix i => (Int32 -> e' -> Int32) -> UArray i Int32 -> [(Int, e')] -> UArray i Int32

unsafeAccumArray :: Ix i => (Int32 -> e' -> Int32) -> Int32 -> (i, i) -> [(Int, e')] -> UArray i Int32

Vector Vector Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

MArray (STUArray s) Int32 (ST s) 
Instance details

Defined in Data.Array.Base

Methods

getBounds :: Ix i => STUArray s i Int32 -> ST s (i, i) #

getNumElements :: Ix i => STUArray s i Int32 -> ST s Int

newArray :: Ix i => (i, i) -> Int32 -> ST s (STUArray s i Int32) #

newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Int32) #

unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Int32)

unsafeRead :: Ix i => STUArray s i Int32 -> Int -> ST s Int32

unsafeWrite :: Ix i => STUArray s i Int32 -> Int -> Int32 -> ST s ()

newtype Vector Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int32 
Instance details

Defined in Data.Vector.Unboxed.Base

data Int64 #

64-bit signed integer type

Instances

Instances details
Bounded Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Enum Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Eq Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

(==) :: Int64 -> Int64 -> Bool #

(/=) :: Int64 -> Int64 -> Bool #

Integral Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Num Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Ord Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

compare :: Int64 -> Int64 -> Ordering #

(<) :: Int64 -> Int64 -> Bool #

(<=) :: Int64 -> Int64 -> Bool #

(>) :: Int64 -> Int64 -> Bool #

(>=) :: Int64 -> Int64 -> Bool #

max :: Int64 -> Int64 -> Int64 #

min :: Int64 -> Int64 -> Int64 #

Read Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Real Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

toRational :: Int64 -> Rational #

Show Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Methods

showsPrec :: Int -> Int64 -> ShowS #

show :: Int64 -> String #

showList :: [Int64] -> ShowS #

Ix Int64

Since: base-2.1

Instance details

Defined in GHC.Int

Hashable Int64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Int64 -> Int #

hash :: Int64 -> Int #

ToJSON Int64 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Int64 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON Int64 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Int64 
Instance details

Defined in Data.Aeson.Types.FromJSON

PrintfArg Int64

Since: base-2.1

Instance details

Defined in Text.Printf

Storable Int64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Int64 -> Int #

alignment :: Int64 -> Int #

peekElemOff :: Ptr Int64 -> Int -> IO Int64 #

pokeElemOff :: Ptr Int64 -> Int -> Int64 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Int64 #

pokeByteOff :: Ptr b -> Int -> Int64 -> IO () #

peek :: Ptr Int64 -> IO Int64 #

poke :: Ptr Int64 -> Int64 -> IO () #

Bits Int64

Since: base-2.1

Instance details

Defined in GHC.Int

FiniteBits Int64

Since: base-4.6.0.0

Instance details

Defined in GHC.Int

Binary Int64 
Instance details

Defined in Data.Binary.Class

Methods

put :: Int64 -> Put #

get :: Get Int64 #

putList :: [Int64] -> Put #

ToValue Int64 
Instance details

Defined in Text.Blaze

ToMarkup Int64 
Instance details

Defined in Text.Blaze

NFData Int64 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Int64 -> () #

GetValue Int64 
Instance details

Defined in Futhark.Data

Methods

getValue :: Value -> Maybe Int64 #

PutValue Int64 
Instance details

Defined in Futhark.Data

Methods

putValue :: Int64 -> Maybe Value #

ToConst Int64 
Instance details

Defined in Language.C.Quote.Base

Methods

toConst :: Int64 -> SrcLoc -> Const #

ToExp Int64 
Instance details

Defined in Language.C.Quote.Base

Methods

toExp :: Int64 -> SrcLoc -> Exp #

Pretty Int64 
Instance details

Defined in Text.PrettyPrint.Mainland.Class

Methods

ppr :: Int64 -> Doc #

pprPrec :: Int -> Int64 -> Doc #

pprList :: [Int64] -> Doc #

Prim Int64 
Instance details

Defined in Data.Primitive.Types

Random Int64 
Instance details

Defined in System.Random

Methods

randomR :: RandomGen g => (Int64, Int64) -> g -> (Int64, g) #

random :: RandomGen g => g -> (Int64, g) #

randomRs :: RandomGen g => (Int64, Int64) -> g -> [Int64] #

randoms :: RandomGen g => g -> [Int64] #

Uniform Int64 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Int64 #

UniformRange Int64 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Int64, Int64) -> g -> m Int64 #

Unbox Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

IsValue Int64 Source # 
Instance details

Defined in Futhark.IR.Prop.Constants

IntExp Int64 Source # 
Instance details

Defined in Futhark.Analysis.PrimExp

NumExp Int64 Source # 
Instance details

Defined in Futhark.Analysis.PrimExp

IsPrimValue Int64 Source # 
Instance details

Defined in Language.Futhark.Syntax

Lift Int64 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Int64 -> Q Exp #

liftTyped :: Int64 -> Q (TExp Int64) #

IArray UArray Int64 
Instance details

Defined in Data.Array.Base

Methods

bounds :: Ix i => UArray i Int64 -> (i, i) #

numElements :: Ix i => UArray i Int64 -> Int

unsafeArray :: Ix i => (i, i) -> [(Int, Int64)] -> UArray i Int64

unsafeAt :: Ix i => UArray i Int64 -> Int -> Int64

unsafeReplace :: Ix i => UArray i Int64 -> [(Int, Int64)] -> UArray i Int64

unsafeAccum :: Ix i => (Int64 -> e' -> Int64) -> UArray i Int64 -> [(Int, e')] -> UArray i Int64

unsafeAccumArray :: Ix i => (Int64 -> e' -> Int64) -> Int64 -> (i, i) -> [(Int, e')] -> UArray i Int64

UTF8Bytes ByteString Int64 
Instance details

Defined in Codec.Binary.UTF8.Generic

Vector Vector Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

Pretty (ShapeDecl Int64) Source # 
Instance details

Defined in Language.Futhark.Pretty

MArray (STUArray s) Int64 (ST s) 
Instance details

Defined in Data.Array.Base

Methods

getBounds :: Ix i => STUArray s i Int64 -> ST s (i, i) #

getNumElements :: Ix i => STUArray s i Int64 -> ST s Int

newArray :: Ix i => (i, i) -> Int64 -> ST s (STUArray s i Int64) #

newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Int64) #

unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Int64)

unsafeRead :: Ix i => STUArray s i Int64 -> Int -> ST s Int64

unsafeWrite :: Ix i => STUArray s i Int64 -> Int -> Int64 -> ST s ()

newtype Vector Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

newtype MVector s Int64 
Instance details

Defined in Data.Vector.Unboxed.Base

data Word8 #

8-bit unsigned integer type

Instances

Instances details
Bounded Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

(==) :: Word8 -> Word8 -> Bool #

(/=) :: Word8 -> Word8 -> Bool #

Integral Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

compare :: Word8 -> Word8 -> Ordering #

(<) :: Word8 -> Word8 -> Bool #

(<=) :: Word8 -> Word8 -> Bool #

(>) :: Word8 -> Word8 -> Bool #

(>=) :: Word8 -> Word8 -> Bool #

max :: Word8 -> Word8 -> Word8 #

min :: Word8 -> Word8 -> Word8 #

Read Word8

Since: base-2.1

Instance details

Defined in GHC.Read

Real Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

toRational :: Word8 -> Rational #

Show Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

showsPrec :: Int -> Word8 -> ShowS #

show :: Word8 -> String #

showList :: [Word8] -> ShowS #

Ix Word8

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word8 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word8 -> Int #

hash :: Word8 -> Int #

ToJSON Word8 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Word8 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON Word8 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Word8 
Instance details

Defined in Data.Aeson.Types.FromJSON

PrintfArg Word8

Since: base-2.1

Instance details

Defined in Text.Printf

Storable Word8

Since: base-2.1

Instance details

Defined in Foreign.Storable

Methods

sizeOf :: Word8 -> Int #

alignment :: Word8 -> Int #

peekElemOff :: Ptr Word8 -> Int -> IO Word8 #

pokeElemOff :: Ptr Word8 -> Int -> Word8 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word8 #

pokeByteOff :: Ptr b -> Int -> Word8 -> IO () #

peek :: Ptr Word8 -> IO Word8 #

poke :: Ptr Word8 -> Word8 -> IO () #

Bits Word8

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word8

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

Binary Word8 
Instance details

Defined in Data.Binary.Class

Methods

put :: Word8 -> Put #

get :: Get Word8 #

putList :: [Word8] -> Put #

NFData Word8 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word8 -> () #

GetValue Word8 
Instance details

Defined in Futhark.Data

Methods

getValue :: Value -> Maybe Word8 #

PutValue Word8 
Instance details

Defined in Futhark.Data

Methods

putValue :: Word8 -> Maybe Value #

ToConst Word8 
Instance details

Defined in Language.C.Quote.Base

Methods

toConst :: Word8 -> SrcLoc -> Const #

ToExp Word8 
Instance details

Defined in Language.C.Quote.Base

Methods

toExp :: Word8 -> SrcLoc -> Exp #

Pretty Word8 
Instance details

Defined in Text.PrettyPrint.Mainland.Class

Methods

ppr :: Word8 -> Doc #

pprPrec :: Int -> Word8 -> Doc #

pprList :: [Word8] -> Doc #

Prim Word8 
Instance details

Defined in Data.Primitive.Types

Random Word8 
Instance details

Defined in System.Random

Methods

randomR :: RandomGen g => (Word8, Word8) -> g -> (Word8, g) #

random :: RandomGen g => g -> (Word8, g) #

randomRs :: RandomGen g => (Word8, Word8) -> g -> [Word8] #

randoms :: RandomGen g => g -> [Word8] #

Uniform Word8 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word8 #

UniformRange Word8 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word8, Word8) -> g -> m Word8 #

ByteSource Word8 
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Word8 g -> Word8 -> g

Unbox Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

IsValue Word8 Source # 
Instance details

Defined in Futhark.IR.Prop.Constants

IsPrimValue Word8 Source # 
Instance details

Defined in Language.Futhark.Syntax

Lift Word8 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Word8 -> Q Exp #

liftTyped :: Word8 -> Q (TExp Word8) #

IArray UArray Word8 
Instance details

Defined in Data.Array.Base

Methods

bounds :: Ix i => UArray i Word8 -> (i, i) #

numElements :: Ix i => UArray i Word8 -> Int

unsafeArray :: Ix i => (i, i) -> [(Int, Word8)] -> UArray i Word8

unsafeAt :: Ix i => UArray i Word8 -> Int -> Word8

unsafeReplace :: Ix i => UArray i Word8 -> [(Int, Word8)] -> UArray i Word8

unsafeAccum :: Ix i => (Word8 -> e' -> Word8) -> UArray i Word8 -> [(Int, e')] -> UArray i Word8

unsafeAccumArray :: Ix i => (Word8 -> e' -> Word8) -> Word8 -> (i, i) -> [(Int, e')] -> UArray i Word8

Vector Vector Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

UTF8Bytes [Word8] Int 
Instance details

Defined in Codec.Binary.UTF8.Generic

Methods

bsplit :: Int -> [Word8] -> ([Word8], [Word8]) #

bdrop :: Int -> [Word8] -> [Word8] #

buncons :: [Word8] -> Maybe (Word8, [Word8]) #

elemIndex :: Word8 -> [Word8] -> Maybe Int #

empty :: [Word8] #

null :: [Word8] -> Bool #

pack :: [Word8] -> [Word8] #

tail :: [Word8] -> [Word8] #

MArray (STUArray s) Word8 (ST s) 
Instance details

Defined in Data.Array.Base

Methods

getBounds :: Ix i => STUArray s i Word8 -> ST s (i, i) #

getNumElements :: Ix i => STUArray s i Word8 -> ST s Int

newArray :: Ix i => (i, i) -> Word8 -> ST s (STUArray s i Word8) #

newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Word8) #

unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Word8)

unsafeRead :: Ix i => STUArray s i Word8 -> Int -> ST s Word8

unsafeWrite :: Ix i => STUArray s i Word8 -> Int -> Word8 -> ST s ()

newtype Vector Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

type ByteSink Word8 g 
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Word8 g = Takes1Byte g
newtype MVector s Word8 
Instance details

Defined in Data.Vector.Unboxed.Base

data Word16 #

16-bit unsigned integer type

Instances

Instances details
Bounded Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

(==) :: Word16 -> Word16 -> Bool #

(/=) :: Word16 -> Word16 -> Bool #

Integral Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word16

Since: base-2.1

Instance details

Defined in GHC.Read

Real Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word16

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word16 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word16 -> Int #

hash :: Word16 -> Int #

ToJSON Word16 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Word16 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON Word16 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Word16 
Instance details

Defined in Data.Aeson.Types.FromJSON

PrintfArg Word16

Since: base-2.1

Instance details

Defined in Text.Printf

Storable Word16

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Word16

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word16

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

Binary Word16 
Instance details

Defined in Data.Binary.Class

Methods

put :: Word16 -> Put #

get :: Get Word16 #

putList :: [Word16] -> Put #

NFData Word16 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word16 -> () #

GetValue Word16 
Instance details

Defined in Futhark.Data

Methods

getValue :: Value -> Maybe Word16 #

PutValue Word16 
Instance details

Defined in Futhark.Data

Methods

putValue :: Word16 -> Maybe Value #

ToConst Word16 
Instance details

Defined in Language.C.Quote.Base

Methods

toConst :: Word16 -> SrcLoc -> Const #

ToExp Word16 
Instance details

Defined in Language.C.Quote.Base

Methods

toExp :: Word16 -> SrcLoc -> Exp #

Pretty Word16 
Instance details

Defined in Text.PrettyPrint.Mainland.Class

Methods

ppr :: Word16 -> Doc #

pprPrec :: Int -> Word16 -> Doc #

pprList :: [Word16] -> Doc #

Prim Word16 
Instance details

Defined in Data.Primitive.Types

Random Word16 
Instance details

Defined in System.Random

Methods

randomR :: RandomGen g => (Word16, Word16) -> g -> (Word16, g) #

random :: RandomGen g => g -> (Word16, g) #

randomRs :: RandomGen g => (Word16, Word16) -> g -> [Word16] #

randoms :: RandomGen g => g -> [Word16] #

Uniform Word16 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word16 #

UniformRange Word16 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word16, Word16) -> g -> m Word16 #

ByteSource Word16 
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Word16 g -> Word16 -> g

Unbox Word16 
Instance details

Defined in Data.Vector.Unboxed.Base

IsValue Word16 Source # 
Instance details

Defined in Futhark.IR.Prop.Constants

IsPrimValue Word16 Source # 
Instance details

Defined in Language.Futhark.Syntax

Lift Word16 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Word16 -> Q Exp #

liftTyped :: Word16 -> Q (TExp Word16) #

IArray UArray Word16 
Instance details

Defined in Data.Array.Base

Methods

bounds :: Ix i => UArray i Word16 -> (i, i) #

numElements :: Ix i => UArray i Word16 -> Int

unsafeArray :: Ix i => (i, i) -> [(Int, Word16)] -> UArray i Word16

unsafeAt :: Ix i => UArray i Word16 -> Int -> Word16

unsafeReplace :: Ix i => UArray i Word16 -> [(Int, Word16)] -> UArray i Word16

unsafeAccum :: Ix i => (Word16 -> e' -> Word16) -> UArray i Word16 -> [(Int, e')] -> UArray i Word16

unsafeAccumArray :: Ix i => (Word16 -> e' -> Word16) -> Word16 -> (i, i) -> [(Int, e')] -> UArray i Word16

Vector Vector Word16 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word16 
Instance details

Defined in Data.Vector.Unboxed.Base

MArray (STUArray s) Word16 (ST s) 
Instance details

Defined in Data.Array.Base

Methods

getBounds :: Ix i => STUArray s i Word16 -> ST s (i, i) #

getNumElements :: Ix i => STUArray s i Word16 -> ST s Int

newArray :: Ix i => (i, i) -> Word16 -> ST s (STUArray s i Word16) #

newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Word16) #

unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Word16)

unsafeRead :: Ix i => STUArray s i Word16 -> Int -> ST s Word16

unsafeWrite :: Ix i => STUArray s i Word16 -> Int -> Word16 -> ST s ()

newtype Vector Word16 
Instance details

Defined in Data.Vector.Unboxed.Base

type ByteSink Word16 g 
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Word16 g = Takes2Bytes g
newtype MVector s Word16 
Instance details

Defined in Data.Vector.Unboxed.Base

data Word32 #

32-bit unsigned integer type

Instances

Instances details
Bounded Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

(==) :: Word32 -> Word32 -> Bool #

(/=) :: Word32 -> Word32 -> Bool #

Integral Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word32

Since: base-2.1

Instance details

Defined in GHC.Read

Real Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word32

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word32 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word32 -> Int #

hash :: Word32 -> Int #

ToJSON Word32 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Word32 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON Word32 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Word32 
Instance details

Defined in Data.Aeson.Types.FromJSON

PrintfArg Word32

Since: base-2.1

Instance details

Defined in Text.Printf

Storable Word32

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Word32

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word32

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

Binary Word32 
Instance details

Defined in Data.Binary.Class

Methods

put :: Word32 -> Put #

get :: Get Word32 #

putList :: [Word32] -> Put #

ToValue Word32 
Instance details

Defined in Text.Blaze

ToMarkup Word32 
Instance details

Defined in Text.Blaze

NFData Word32 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word32 -> () #

GetValue Word32 
Instance details

Defined in Futhark.Data

Methods

getValue :: Value -> Maybe Word32 #

PutValue Word32 
Instance details

Defined in Futhark.Data

Methods

putValue :: Word32 -> Maybe Value #

ToConst Word32 
Instance details

Defined in Language.C.Quote.Base

Methods

toConst :: Word32 -> SrcLoc -> Const #

ToExp Word32 
Instance details

Defined in Language.C.Quote.Base

Methods

toExp :: Word32 -> SrcLoc -> Exp #

Pretty Word32 
Instance details

Defined in Text.PrettyPrint.Mainland.Class

Methods

ppr :: Word32 -> Doc #

pprPrec :: Int -> Word32 -> Doc #

pprList :: [Word32] -> Doc #

Prim Word32 
Instance details

Defined in Data.Primitive.Types

Random Word32 
Instance details

Defined in System.Random

Methods

randomR :: RandomGen g => (Word32, Word32) -> g -> (Word32, g) #

random :: RandomGen g => g -> (Word32, g) #

randomRs :: RandomGen g => (Word32, Word32) -> g -> [Word32] #

randoms :: RandomGen g => g -> [Word32] #

Uniform Word32 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word32 #

UniformRange Word32 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word32, Word32) -> g -> m Word32 #

ByteSource Word32 
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Word32 g -> Word32 -> g

Unbox Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

IsValue Word32 Source # 
Instance details

Defined in Futhark.IR.Prop.Constants

IsPrimValue Word32 Source # 
Instance details

Defined in Language.Futhark.Syntax

Lift Word32 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Word32 -> Q Exp #

liftTyped :: Word32 -> Q (TExp Word32) #

IArray UArray Word32 
Instance details

Defined in Data.Array.Base

Methods

bounds :: Ix i => UArray i Word32 -> (i, i) #

numElements :: Ix i => UArray i Word32 -> Int

unsafeArray :: Ix i => (i, i) -> [(Int, Word32)] -> UArray i Word32

unsafeAt :: Ix i => UArray i Word32 -> Int -> Word32

unsafeReplace :: Ix i => UArray i Word32 -> [(Int, Word32)] -> UArray i Word32

unsafeAccum :: Ix i => (Word32 -> e' -> Word32) -> UArray i Word32 -> [(Int, e')] -> UArray i Word32

unsafeAccumArray :: Ix i => (Word32 -> e' -> Word32) -> Word32 -> (i, i) -> [(Int, e')] -> UArray i Word32

Vector Vector Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

MArray (STUArray s) Word32 (ST s) 
Instance details

Defined in Data.Array.Base

Methods

getBounds :: Ix i => STUArray s i Word32 -> ST s (i, i) #

getNumElements :: Ix i => STUArray s i Word32 -> ST s Int

newArray :: Ix i => (i, i) -> Word32 -> ST s (STUArray s i Word32) #

newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Word32) #

unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Word32)

unsafeRead :: Ix i => STUArray s i Word32 -> Int -> ST s Word32

unsafeWrite :: Ix i => STUArray s i Word32 -> Int -> Word32 -> ST s ()

newtype Vector Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

type ByteSink Word32 g 
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Word32 g = Takes4Bytes g
newtype MVector s Word32 
Instance details

Defined in Data.Vector.Unboxed.Base

data Word64 #

64-bit unsigned integer type

Instances

Instances details
Bounded Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Enum Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Eq Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Methods

(==) :: Word64 -> Word64 -> Bool #

(/=) :: Word64 -> Word64 -> Bool #

Integral Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Num Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Ord Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Read Word64

Since: base-2.1

Instance details

Defined in GHC.Read

Real Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Show Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Ix Word64

Since: base-2.1

Instance details

Defined in GHC.Word

Hashable Word64 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Word64 -> Int #

hash :: Word64 -> Int #

ToJSON Word64 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Word64 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON Word64 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Word64 
Instance details

Defined in Data.Aeson.Types.FromJSON

PrintfArg Word64

Since: base-2.1

Instance details

Defined in Text.Printf

Storable Word64

Since: base-2.1

Instance details

Defined in Foreign.Storable

Bits Word64

Since: base-2.1

Instance details

Defined in GHC.Word

FiniteBits Word64

Since: base-4.6.0.0

Instance details

Defined in GHC.Word

Binary Word64 
Instance details

Defined in Data.Binary.Class

Methods

put :: Word64 -> Put #

get :: Get Word64 #

putList :: [Word64] -> Put #

ToValue Word64 
Instance details

Defined in Text.Blaze

ToMarkup Word64 
Instance details

Defined in Text.Blaze

NFData Word64 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Word64 -> () #

GetValue Word64 
Instance details

Defined in Futhark.Data

Methods

getValue :: Value -> Maybe Word64 #

PutValue Word64 
Instance details

Defined in Futhark.Data

Methods

putValue :: Word64 -> Maybe Value #

ToConst Word64 
Instance details

Defined in Language.C.Quote.Base

Methods

toConst :: Word64 -> SrcLoc -> Const #

ToExp Word64 
Instance details

Defined in Language.C.Quote.Base

Methods

toExp :: Word64 -> SrcLoc -> Exp #

Pretty Word64 
Instance details

Defined in Text.PrettyPrint.Mainland.Class

Methods

ppr :: Word64 -> Doc #

pprPrec :: Int -> Word64 -> Doc #

pprList :: [Word64] -> Doc #

Prim Word64 
Instance details

Defined in Data.Primitive.Types

Random Word64 
Instance details

Defined in System.Random

Methods

randomR :: RandomGen g => (Word64, Word64) -> g -> (Word64, g) #

random :: RandomGen g => g -> (Word64, g) #

randomRs :: RandomGen g => (Word64, Word64) -> g -> [Word64] #

randoms :: RandomGen g => g -> [Word64] #

Uniform Word64 
Instance details

Defined in System.Random.Internal

Methods

uniformM :: StatefulGen g m => g -> m Word64 #

UniformRange Word64 
Instance details

Defined in System.Random.Internal

Methods

uniformRM :: StatefulGen g m => (Word64, Word64) -> g -> m Word64 #

ByteSource Word64 
Instance details

Defined in Data.UUID.Types.Internal.Builder

Methods

(/-/) :: ByteSink Word64 g -> Word64 -> g

Unbox Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

IsValue Word64 Source # 
Instance details

Defined in Futhark.IR.Prop.Constants

IsPrimValue Word64 Source # 
Instance details

Defined in Language.Futhark.Syntax

Lift Word64 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Word64 -> Q Exp #

liftTyped :: Word64 -> Q (TExp Word64) #

IArray UArray Word64 
Instance details

Defined in Data.Array.Base

Methods

bounds :: Ix i => UArray i Word64 -> (i, i) #

numElements :: Ix i => UArray i Word64 -> Int

unsafeArray :: Ix i => (i, i) -> [(Int, Word64)] -> UArray i Word64

unsafeAt :: Ix i => UArray i Word64 -> Int -> Word64

unsafeReplace :: Ix i => UArray i Word64 -> [(Int, Word64)] -> UArray i Word64

unsafeAccum :: Ix i => (Word64 -> e' -> Word64) -> UArray i Word64 -> [(Int, e')] -> UArray i Word64

unsafeAccumArray :: Ix i => (Word64 -> e' -> Word64) -> Word64 -> (i, i) -> [(Int, e')] -> UArray i Word64

Vector Vector Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

MVector MVector Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

MArray (STUArray s) Word64 (ST s) 
Instance details

Defined in Data.Array.Base

Methods

getBounds :: Ix i => STUArray s i Word64 -> ST s (i, i) #

getNumElements :: Ix i => STUArray s i Word64 -> ST s Int

newArray :: Ix i => (i, i) -> Word64 -> ST s (STUArray s i Word64) #

newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Word64) #

unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Word64)

unsafeRead :: Ix i => STUArray s i Word64 -> Int -> ST s Word64

unsafeWrite :: Ix i => STUArray s i Word64 -> Int -> Word64 -> ST s ()

newtype Vector Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

type ByteSink Word64 g 
Instance details

Defined in Data.UUID.Types.Internal.Builder

type ByteSink Word64 g = Takes8Bytes g
newtype MVector s Word64 
Instance details

Defined in Data.Vector.Unboxed.Base

data Half #

Instances

Instances details
Eq Half 
Instance details

Defined in Numeric.Half.Internal

Methods

(==) :: Half -> Half -> Bool #

(/=) :: Half -> Half -> Bool #

Floating Half 
Instance details

Defined in Numeric.Half.Internal

Methods

pi :: Half #

exp :: Half -> Half #

log :: Half -> Half #

sqrt :: Half -> Half #

(**) :: Half -> Half -> Half #

logBase :: Half -> Half -> Half #

sin :: Half -> Half #

cos :: Half -> Half #

tan :: Half -> Half #

asin :: Half -> Half #

acos :: Half -> Half #

atan :: Half -> Half #

sinh :: Half -> Half #

cosh :: Half -> Half #

tanh :: Half -> Half #

asinh :: Half -> Half #

acosh :: Half -> Half #

atanh :: Half -> Half #

log1p :: Half -> Half #

expm1 :: Half -> Half #

log1pexp :: Half -> Half #

log1mexp :: Half -> Half #

Fractional Half 
Instance details

Defined in Numeric.Half.Internal

Methods

(/) :: Half -> Half -> Half #

recip :: Half -> Half #

fromRational :: Rational -> Half #

Num Half 
Instance details

Defined in Numeric.Half.Internal

Methods

(+) :: Half -> Half -> Half #

(-) :: Half -> Half -> Half #

(*) :: Half -> Half -> Half #

negate :: Half -> Half #

abs :: Half -> Half #

signum :: Half -> Half #

fromInteger :: Integer -> Half #

Ord Half 
Instance details

Defined in Numeric.Half.Internal

Methods

compare :: Half -> Half -> Ordering #

(<) :: Half -> Half -> Bool #

(<=) :: Half -> Half -> Bool #

(>) :: Half -> Half -> Bool #

(>=) :: Half -> Half -> Bool #

max :: Half -> Half -> Half #

min :: Half -> Half -> Half #

Read Half 
Instance details

Defined in Numeric.Half.Internal

Real Half 
Instance details

Defined in Numeric.Half.Internal

Methods

toRational :: Half -> Rational #

RealFloat Half 
Instance details

Defined in Numeric.Half.Internal

RealFrac Half 
Instance details

Defined in Numeric.Half.Internal

Methods

properFraction :: Integral b => Half -> (b, Half) #

truncate :: Integral b => Half -> b #

round :: Integral b => Half -> b #

ceiling :: Integral b => Half -> b #

floor :: Integral b => Half -> b #

Show Half 
Instance details

Defined in Numeric.Half.Internal

Methods

showsPrec :: Int -> Half -> ShowS #

show :: Half -> String #

showList :: [Half] -> ShowS #

Generic Half 
Instance details

Defined in Numeric.Half.Internal

Associated Types

type Rep Half :: Type -> Type #

Methods

from :: Half -> Rep Half x #

to :: Rep Half x -> Half #

Storable Half 
Instance details

Defined in Numeric.Half.Internal

Methods

sizeOf :: Half -> Int #

alignment :: Half -> Int #

peekElemOff :: Ptr Half -> Int -> IO Half #

pokeElemOff :: Ptr Half -> Int -> Half -> IO () #

peekByteOff :: Ptr b -> Int -> IO Half #

pokeByteOff :: Ptr b -> Int -> Half -> IO () #

peek :: Ptr Half -> IO Half #

poke :: Ptr Half -> Half -> IO () #

Binary Half 
Instance details

Defined in Numeric.Half.Internal

Methods

put :: Half -> Put #

get :: Get Half #

putList :: [Half] -> Put #

NFData Half 
Instance details

Defined in Numeric.Half.Internal

Methods

rnf :: Half -> () #

Pretty Half Source # 
Instance details

Defined in Futhark.Util.Pretty

Methods

ppr :: Half -> Doc #

pprPrec :: Int -> Half -> Doc #

pprList :: [Half] -> Doc #

UniformRange Half Source # 
Instance details

Defined in Futhark.CLI.Dataset

Methods

uniformRM :: StatefulGen g m => (Half, Half) -> g -> m Half #

FloatExp Half Source # 
Instance details

Defined in Futhark.Analysis.PrimExp

NumExp Half Source # 
Instance details

Defined in Futhark.Analysis.PrimExp

Lift Half 
Instance details

Defined in Numeric.Half.Internal

Methods

lift :: Half -> Q Exp #

liftTyped :: Half -> Q (TExp Half) #

Pretty v => Floating (TPrimExp Half v) Source # 
Instance details

Defined in Futhark.Analysis.PrimExp

type Rep Half 
Instance details

Defined in Numeric.Half.Internal

type Rep Half = D1 ('MetaData "Half" "Numeric.Half.Internal" "half-0.3.1-5ca52a1e1628103d73d2b3808e363eacbe4b702926cfd383a5253d33eda522e0" 'True) (C1 ('MetaCons "Half" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHalf") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUShort)))

srclocOf :: Located a => a -> SrcLoc #

The SrcLoc of a Located value.

data Loc #

Location type, consisting of a beginning position and an end position.

Instances

Instances details
Eq Loc 
Instance details

Defined in Data.Loc

Methods

(==) :: Loc -> Loc -> Bool #

(/=) :: Loc -> Loc -> Bool #

Data Loc 
Instance details

Defined in Data.Loc

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Loc -> c Loc #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Loc #

toConstr :: Loc -> Constr #

dataTypeOf :: Loc -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Loc) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Loc) #

gmapT :: (forall b. Data b => b -> b) -> Loc -> Loc #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Loc -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Loc -> r #

gmapQ :: (forall d. Data d => d -> u) -> Loc -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Loc -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Loc -> m Loc #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Loc -> m Loc #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Loc -> m Loc #

Ord Loc 
Instance details

Defined in Data.Loc

Methods

compare :: Loc -> Loc -> Ordering #

(<) :: Loc -> Loc -> Bool #

(<=) :: Loc -> Loc -> Bool #

(>) :: Loc -> Loc -> Bool #

(>=) :: Loc -> Loc -> Bool #

max :: Loc -> Loc -> Loc #

min :: Loc -> Loc -> Loc #

Read Loc 
Instance details

Defined in Data.Loc

Show Loc 
Instance details

Defined in Data.Loc

Methods

showsPrec :: Int -> Loc -> ShowS #

show :: Loc -> String #

showList :: [Loc] -> ShowS #

Semigroup Loc 
Instance details

Defined in Data.Loc

Methods

(<>) :: Loc -> Loc -> Loc #

sconcat :: NonEmpty Loc -> Loc #

stimes :: Integral b => b -> Loc -> Loc #

Monoid Loc 
Instance details

Defined in Data.Loc

Methods

mempty :: Loc #

mappend :: Loc -> Loc -> Loc #

mconcat :: [Loc] -> Loc #

Pretty Loc 
Instance details

Defined in Text.PrettyPrint.Mainland.Class

Methods

ppr :: Loc -> Doc #

pprPrec :: Int -> Loc -> Doc #

pprList :: [Loc] -> Doc #

IsLocation Loc 
Instance details

Defined in Data.Loc

Methods

fromLoc :: Loc -> Loc #

fromPos :: Pos -> Loc #

Located Loc 
Instance details

Defined in Data.Loc

Methods

locOf :: Loc -> Loc #

locOfList :: [Loc] -> Loc #

data SrcLoc #

Source location type. Source location are all equal, which allows AST nodes to be compared modulo location information.

Instances

Instances details
Eq SrcLoc 
Instance details

Defined in Data.Loc

Methods

(==) :: SrcLoc -> SrcLoc -> Bool #

(/=) :: SrcLoc -> SrcLoc -> Bool #

Data SrcLoc 
Instance details

Defined in Data.Loc

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcLoc -> c SrcLoc #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcLoc #

toConstr :: SrcLoc -> Constr #

dataTypeOf :: SrcLoc -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcLoc) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcLoc) #

gmapT :: (forall b. Data b => b -> b) -> SrcLoc -> SrcLoc #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcLoc -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcLoc -> r #

gmapQ :: (forall d. Data d => d -> u) -> SrcLoc -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcLoc -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcLoc -> m SrcLoc #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcLoc -> m SrcLoc #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcLoc -> m SrcLoc #

Ord SrcLoc 
Instance details

Defined in Data.Loc

Read SrcLoc 
Instance details

Defined in Data.Loc

Show SrcLoc 
Instance details

Defined in Data.Loc

Semigroup SrcLoc 
Instance details

Defined in Data.Loc

Monoid SrcLoc 
Instance details

Defined in Data.Loc

IsLocation SrcLoc 
Instance details

Defined in Data.Loc

Methods

fromLoc :: Loc -> SrcLoc #

fromPos :: Pos -> SrcLoc #

Located SrcLoc 
Instance details

Defined in Data.Loc

Methods

locOf :: SrcLoc -> Loc #

locOfList :: [SrcLoc] -> Loc #

ToIdent (SrcLoc -> Id) 
Instance details

Defined in Language.C.Quote.Base

Methods

toIdent :: (SrcLoc -> Id) -> SrcLoc -> Id #

class Located a where #

Located values have a location.

Minimal complete definition

locOf

Methods

locOf :: a -> Loc #

locOfList :: [a] -> Loc #

Instances

Instances details
Located Id 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: Id -> Loc #

locOfList :: [Id] -> Loc #

Located StringLit 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: StringLit -> Loc #

locOfList :: [StringLit] -> Loc #

Located Storage 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: Storage -> Loc #

locOfList :: [Storage] -> Loc #

Located TypeQual 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: TypeQual -> Loc #

locOfList :: [TypeQual] -> Loc #

Located Sign 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: Sign -> Loc #

locOfList :: [Sign] -> Loc #

Located TypeSpec 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: TypeSpec -> Loc #

locOfList :: [TypeSpec] -> Loc #

Located DeclSpec 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: DeclSpec -> Loc #

locOfList :: [DeclSpec] -> Loc #

Located ArraySize 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: ArraySize -> Loc #

locOfList :: [ArraySize] -> Loc #

Located Decl 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: Decl -> Loc #

locOfList :: [Decl] -> Loc #

Located Type 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: Type -> Loc #

locOfList :: [Type] -> Loc #

Located Designator 
Instance details

Defined in Language.C.Syntax

Located Designation 
Instance details

Defined in Language.C.Syntax

Located Initializer 
Instance details

Defined in Language.C.Syntax

Located Init 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: Init -> Loc #

locOfList :: [Init] -> Loc #

Located Typedef 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: Typedef -> Loc #

locOfList :: [Typedef] -> Loc #

Located InitGroup 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: InitGroup -> Loc #

locOfList :: [InitGroup] -> Loc #

Located Field 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: Field -> Loc #

locOfList :: [Field] -> Loc #

Located FieldGroup 
Instance details

Defined in Language.C.Syntax

Located CEnum 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: CEnum -> Loc #

locOfList :: [CEnum] -> Loc #

Located Attr 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: Attr -> Loc #

locOfList :: [Attr] -> Loc #

Located Param 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: Param -> Loc #

locOfList :: [Param] -> Loc #

Located Params 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: Params -> Loc #

locOfList :: [Params] -> Loc #

Located Func 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: Func -> Loc #

locOfList :: [Func] -> Loc #

Located Definition 
Instance details

Defined in Language.C.Syntax

Located Stm 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: Stm -> Loc #

locOfList :: [Stm] -> Loc #

Located BlockItem 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: BlockItem -> Loc #

locOfList :: [BlockItem] -> Loc #

Located Const 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: Const -> Loc #

locOfList :: [Const] -> Loc #

Located Exp 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: Exp -> Loc #

locOfList :: [Exp] -> Loc #

Located BlockType 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: BlockType -> Loc #

locOfList :: [BlockType] -> Loc #

Located ObjCIvarDecl 
Instance details

Defined in Language.C.Syntax

Located ObjCVisibilitySpec 
Instance details

Defined in Language.C.Syntax

Located ObjCIfaceDecl 
Instance details

Defined in Language.C.Syntax

Located ObjCPropAttr 
Instance details

Defined in Language.C.Syntax

Located ObjCMethodReq 
Instance details

Defined in Language.C.Syntax

Located ObjCParam 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: ObjCParam -> Loc #

locOfList :: [ObjCParam] -> Loc #

Located ObjCMethodProto 
Instance details

Defined in Language.C.Syntax

Located ObjCCatch 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: ObjCCatch -> Loc #

locOfList :: [ObjCCatch] -> Loc #

Located ObjCDictElem 
Instance details

Defined in Language.C.Syntax

Located ObjCRecv 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: ObjCRecv -> Loc #

locOfList :: [ObjCRecv] -> Loc #

Located ObjCArg 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: ObjCArg -> Loc #

locOfList :: [ObjCArg] -> Loc #

Located LambdaIntroducer 
Instance details

Defined in Language.C.Syntax

Located LambdaDeclarator 
Instance details

Defined in Language.C.Syntax

Located ExeConfig 
Instance details

Defined in Language.C.Syntax

Methods

locOf :: ExeConfig -> Loc #

locOfList :: [ExeConfig] -> Loc #

Located Pos 
Instance details

Defined in Data.Loc

Methods

locOf :: Pos -> Loc #

locOfList :: [Pos] -> Loc #

Located Loc 
Instance details

Defined in Data.Loc

Methods

locOf :: Loc -> Loc #

locOfList :: [Loc] -> Loc #

Located SrcLoc 
Instance details

Defined in Data.Loc

Methods

locOf :: SrcLoc -> Loc #

locOfList :: [SrcLoc] -> Loc #

Located DocComment Source # 
Instance details

Defined in Language.Futhark.Syntax

Located ImportName Source # 
Instance details

Defined in Language.Futhark.Semantic

Located StackFrame Source # 
Instance details

Defined in Language.Futhark.Interpreter

Located Constraint Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Unify

Located Usage Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Unify

Methods

locOf :: Usage -> Loc #

locOfList :: [Usage] -> Loc #

Located a => Located [a] 
Instance details

Defined in Data.Loc

Methods

locOf :: [a] -> Loc #

locOfList :: [[a]] -> Loc #

Located a => Located (Maybe a) 
Instance details

Defined in Data.Loc

Methods

locOf :: Maybe a -> Loc #

locOfList :: [Maybe a] -> Loc #

Located (L a) 
Instance details

Defined in Data.Loc

Methods

locOf :: L a -> Loc #

locOfList :: [L a] -> Loc #

Located (TypeParamBase vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: TypeParamBase vn -> Loc #

locOfList :: [TypeParamBase vn] -> Loc #

Located (SizeBinder vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: SizeBinder vn -> Loc #

locOfList :: [SizeBinder vn] -> Loc #

Located a => Located (Inclusiveness a) Source # 
Instance details

Defined in Language.Futhark.Syntax

Located (TypeArgExp vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: TypeArgExp vn -> Loc #

locOfList :: [TypeArgExp vn] -> Loc #

Located (TypeExp vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: TypeExp vn -> Loc #

locOfList :: [TypeExp vn] -> Loc #

Located (L a) Source # 
Instance details

Defined in Language.Futhark.Parser.Lexer

Methods

locOf :: L a -> Loc #

locOfList :: [L a] -> Loc #

Located (DecBase f vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: DecBase f vn -> Loc #

locOfList :: [DecBase f vn] -> Loc #

Located (ModParamBase f vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: ModParamBase f vn -> Loc #

locOfList :: [ModParamBase f vn] -> Loc #

Located (ModBindBase f vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: ModBindBase f vn -> Loc #

locOfList :: [ModBindBase f vn] -> Loc #

Located (ModExpBase f vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: ModExpBase f vn -> Loc #

locOfList :: [ModExpBase f vn] -> Loc #

Located (SigBindBase f vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: SigBindBase f vn -> Loc #

locOfList :: [SigBindBase f vn] -> Loc #

Located (TypeRefBase f vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: TypeRefBase f vn -> Loc #

locOfList :: [TypeRefBase f vn] -> Loc #

Located (SigExpBase f vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: SigExpBase f vn -> Loc #

locOfList :: [SigExpBase f vn] -> Loc #

Located (SpecBase f vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: SpecBase f vn -> Loc #

locOfList :: [SpecBase f vn] -> Loc #

Located (TypeBindBase f vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: TypeBindBase f vn -> Loc #

locOfList :: [TypeBindBase f vn] -> Loc #

Located (ValBindBase f vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: ValBindBase f vn -> Loc #

locOfList :: [ValBindBase f vn] -> Loc #

Located (PatBase f vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: PatBase f vn -> Loc #

locOfList :: [PatBase f vn] -> Loc #

Located (CaseBase f vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: CaseBase f vn -> Loc #

locOfList :: [CaseBase f vn] -> Loc #

Located (FieldBase f vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: FieldBase f vn -> Loc #

locOfList :: [FieldBase f vn] -> Loc #

Located (ExpBase f vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: ExpBase f vn -> Loc #

locOfList :: [ExpBase f vn] -> Loc #

Located (AppExpBase f vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: AppExpBase f vn -> Loc #

locOfList :: [AppExpBase f vn] -> Loc #

Located (IdentBase ty vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: IdentBase ty vn -> Loc #

locOfList :: [IdentBase ty vn] -> Loc #

Located (TypeDeclBase f vn) Source # 
Instance details

Defined in Language.Futhark.Syntax

Methods

locOf :: TypeDeclBase f vn -> Loc #

locOfList :: [TypeDeclBase f vn] -> Loc #

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

Prettyprint a value, wrapped to 80 characters.

data ConvOp Source #

Conversion operators try to generalise the from t0 x to t1 instructions from LLVM.

Constructors

ZExt IntType IntType

Zero-extend the former integer type to the latter. If the new type is smaller, the result is a truncation.

SExt IntType IntType

Sign-extend the former integer type to the latter. If the new type is smaller, the result is a truncation.

FPConv FloatType FloatType

Convert value of the former floating-point type to the latter. If the new type is smaller, the result is a truncation.

FPToUI FloatType IntType

Convert a floating-point value to the nearest unsigned integer (rounding towards zero).

FPToSI FloatType IntType

Convert a floating-point value to the nearest signed integer (rounding towards zero).

UIToFP IntType FloatType

Convert an unsigned integer to a floating-point value.

SIToFP IntType FloatType

Convert a signed integer to a floating-point value.

IToB IntType

Convert an integer to a boolean value. Zero becomes false; anything else is true.

BToI IntType

Convert a boolean to an integer. True is converted to 1 and False to 0.

Instances

Instances details
Eq ConvOp Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

(==) :: ConvOp -> ConvOp -> Bool #

(/=) :: ConvOp -> ConvOp -> Bool #

Ord ConvOp Source # 
Instance details

Defined in Futhark.IR.Primitive

Show ConvOp Source # 
Instance details

Defined in Futhark.IR.Primitive

Pretty ConvOp Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

ppr :: ConvOp -> Doc #

pprPrec :: Int -> ConvOp -> Doc #

pprList :: [ConvOp] -> Doc #

data CmpOp Source #

Comparison operators are like BinOps, but they always return a boolean value. The somewhat ugly constructor names are straight out of LLVM.

Constructors

CmpEq PrimType

All types equality.

CmpUlt IntType

Unsigned less than.

CmpUle IntType

Unsigned less than or equal.

CmpSlt IntType

Signed less than.

CmpSle IntType

Signed less than or equal.

FCmpLt FloatType

Floating-point less than.

FCmpLe FloatType

Floating-point less than or equal.

CmpLlt

Boolean less than.

CmpLle

Boolean less than or equal.

Instances

Instances details
Eq CmpOp Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

(==) :: CmpOp -> CmpOp -> Bool #

(/=) :: CmpOp -> CmpOp -> Bool #

Ord CmpOp Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

compare :: CmpOp -> CmpOp -> Ordering #

(<) :: CmpOp -> CmpOp -> Bool #

(<=) :: CmpOp -> CmpOp -> Bool #

(>) :: CmpOp -> CmpOp -> Bool #

(>=) :: CmpOp -> CmpOp -> Bool #

max :: CmpOp -> CmpOp -> CmpOp #

min :: CmpOp -> CmpOp -> CmpOp #

Show CmpOp Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

showsPrec :: Int -> CmpOp -> ShowS #

show :: CmpOp -> String #

showList :: [CmpOp] -> ShowS #

Pretty CmpOp Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

ppr :: CmpOp -> Doc #

pprPrec :: Int -> CmpOp -> Doc #

pprList :: [CmpOp] -> Doc #

data BinOp Source #

Binary operators. These correspond closely to the binary operators in LLVM. Most are parametrised by their expected input and output types.

Constructors

Add IntType Overflow

Integer addition.

FAdd FloatType

Floating-point addition.

Sub IntType Overflow

Integer subtraction.

FSub FloatType

Floating-point subtraction.

Mul IntType Overflow

Integer multiplication.

FMul FloatType

Floating-point multiplication.

UDiv IntType Safety

Unsigned integer division. Rounds towards negativity infinity. Note: this is different from LLVM.

UDivUp IntType Safety

Unsigned integer division. Rounds towards positive infinity.

SDiv IntType Safety

Signed integer division. Rounds towards negativity infinity. Note: this is different from LLVM.

SDivUp IntType Safety

Signed integer division. Rounds towards positive infinity.

FDiv FloatType

Floating-point division.

FMod FloatType

Floating-point modulus.

UMod IntType Safety

Unsigned integer modulus; the countepart to UDiv.

SMod IntType Safety

Signed integer modulus; the countepart to SDiv.

SQuot IntType Safety

Signed integer division. Rounds towards zero. This corresponds to the sdiv instruction in LLVM and integer division in C.

SRem IntType Safety

Signed integer division. Rounds towards zero. This corresponds to the srem instruction in LLVM and integer modulo in C.

SMin IntType

Returns the smallest of two signed integers.

UMin IntType

Returns the smallest of two unsigned integers.

FMin FloatType

Returns the smallest of two floating-point numbers.

SMax IntType

Returns the greatest of two signed integers.

UMax IntType

Returns the greatest of two unsigned integers.

FMax FloatType

Returns the greatest of two floating-point numbers.

Shl IntType

Left-shift.

LShr IntType

Logical right-shift, zero-extended.

AShr IntType

Arithmetic right-shift, sign-extended.

And IntType

Bitwise and.

Or IntType

Bitwise or.

Xor IntType

Bitwise exclusive-or.

Pow IntType

Integer exponentiation.

FPow FloatType

Floating-point exponentiation.

LogAnd

Boolean and - not short-circuiting.

LogOr

Boolean or - not short-circuiting.

Instances

Instances details
Eq BinOp Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

(==) :: BinOp -> BinOp -> Bool #

(/=) :: BinOp -> BinOp -> Bool #

Ord BinOp Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

compare :: BinOp -> BinOp -> Ordering #

(<) :: BinOp -> BinOp -> Bool #

(<=) :: BinOp -> BinOp -> Bool #

(>) :: BinOp -> BinOp -> Bool #

(>=) :: BinOp -> BinOp -> Bool #

max :: BinOp -> BinOp -> BinOp #

min :: BinOp -> BinOp -> BinOp #

Show BinOp Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

showsPrec :: Int -> BinOp -> ShowS #

show :: BinOp -> String #

showList :: [BinOp] -> ShowS #

Pretty BinOp Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

ppr :: BinOp -> Doc #

pprPrec :: Int -> BinOp -> Doc #

pprList :: [BinOp] -> Doc #

data Safety Source #

Whether something is safe or unsafe (mostly function calls, and in the context of whether operations are dynamically checked). When we inline an Unsafe function, we remove all safety checks in its body. The Ord instance picks Unsafe as being less than Safe.

For operations like integer division, a safe division will not explode the computer in case of division by zero, but instead return some unspecified value. This always involves a run-time check, so generally the unsafe variant is what the compiler will insert, but guarded by an explicit assertion elsewhere. Safe operations are useful when the optimiser wants to move e.g. a division to a location where the divisor may be zero, but where the result will only be used when it is non-zero (so it doesn't matter what result is provided with a zero divisor, as long as the program keeps running).

Constructors

Unsafe 
Safe 

Instances

Instances details
Eq Safety Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

(==) :: Safety -> Safety -> Bool #

(/=) :: Safety -> Safety -> Bool #

Ord Safety Source # 
Instance details

Defined in Futhark.IR.Primitive

Show Safety Source # 
Instance details

Defined in Futhark.IR.Primitive

data Overflow Source #

What to do in case of arithmetic overflow. Futhark's semantics are that overflow does wraparound, but for generated code (like address arithmetic), it can be beneficial for overflow to be undefined behaviour, as it allows better optimisation of things such as GPU kernels.

Note that all values of this type are considered equal for Eq and Ord.

Instances

Instances details
Eq Overflow Source # 
Instance details

Defined in Futhark.IR.Primitive

Ord Overflow Source # 
Instance details

Defined in Futhark.IR.Primitive

Show Overflow Source # 
Instance details

Defined in Futhark.IR.Primitive

data UnOp Source #

Various unary operators. It is a bit ad-hoc what is a unary operator and what is a built-in function. Perhaps these should all go away eventually.

Constructors

Not

E.g., ! True == False.

Complement IntType

E.g., ~(~1) = 1.

Abs IntType

abs(-2) = 2.

FAbs FloatType

fabs(-2.0) = 2.0.

SSignum IntType

Signed sign function: ssignum(-2) = -1.

USignum IntType

Unsigned sign function: usignum(2) = 1.

FSignum FloatType

Floating-point sign function.

Instances

Instances details
Eq UnOp Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

(==) :: UnOp -> UnOp -> Bool #

(/=) :: UnOp -> UnOp -> Bool #

Ord UnOp Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

compare :: UnOp -> UnOp -> Ordering #

(<) :: UnOp -> UnOp -> Bool #

(<=) :: UnOp -> UnOp -> Bool #

(>) :: UnOp -> UnOp -> Bool #

(>=) :: UnOp -> UnOp -> Bool #

max :: UnOp -> UnOp -> UnOp #

min :: UnOp -> UnOp -> UnOp #

Show UnOp Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

showsPrec :: Int -> UnOp -> ShowS #

show :: UnOp -> String #

showList :: [UnOp] -> ShowS #

Pretty UnOp Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

ppr :: UnOp -> Doc #

pprPrec :: Int -> UnOp -> Doc #

pprList :: [UnOp] -> Doc #

data PrimValue Source #

Non-array values.

Constructors

IntValue !IntValue 
FloatValue !FloatValue 
BoolValue !Bool 
UnitValue

The only value of type Unit.

Instances

Instances details
Eq PrimValue Source # 
Instance details

Defined in Futhark.IR.Primitive

Ord PrimValue Source # 
Instance details

Defined in Futhark.IR.Primitive

Show PrimValue Source # 
Instance details

Defined in Futhark.IR.Primitive

ToExp PrimValue Source # 
Instance details

Defined in Futhark.CodeGen.Backends.SimpleRep

Methods

toExp :: PrimValue -> SrcLoc -> Exp #

Pretty PrimValue Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

ppr :: PrimValue -> Doc #

pprPrec :: Int -> PrimValue -> Doc #

pprList :: [PrimValue] -> Doc #

IsValue PrimValue Source # 
Instance details

Defined in Futhark.IR.Prop.Constants

data IntValue Source #

An integer value.

Instances

Instances details
Eq IntValue Source # 
Instance details

Defined in Futhark.IR.Primitive

Ord IntValue Source # 
Instance details

Defined in Futhark.IR.Primitive

Show IntValue Source # 
Instance details

Defined in Futhark.IR.Primitive

ToExp IntValue Source # 
Instance details

Defined in Futhark.CodeGen.Backends.SimpleRep

Methods

toExp :: IntValue -> SrcLoc -> Exp #

Pretty IntValue Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

ppr :: IntValue -> Doc #

pprPrec :: Int -> IntValue -> Doc #

pprList :: [IntValue] -> Doc #

IsValue IntValue Source # 
Instance details

Defined in Futhark.IR.Prop.Constants

data PrimType Source #

Low-level primitive types.

Constructors

IntType IntType 
FloatType FloatType 
Bool 
Unit

An informationless type - An array of this type takes up no space.

Instances

Instances details
Bounded PrimType Source # 
Instance details

Defined in Futhark.IR.Primitive

Enum PrimType Source # 
Instance details

Defined in Futhark.IR.Primitive

Eq PrimType Source # 
Instance details

Defined in Futhark.IR.Primitive

Ord PrimType Source # 
Instance details

Defined in Futhark.IR.Primitive

Show PrimType Source # 
Instance details

Defined in Futhark.IR.Primitive

Pretty PrimType Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

ppr :: PrimType -> Doc #

pprPrec :: Int -> PrimType -> Doc #

pprList :: [PrimType] -> Doc #

FreeIn PrimType Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: PrimType -> FV Source #

Substitute PrimType Source # 
Instance details

Defined in Futhark.Transform.Substitute

Rename PrimType Source # 
Instance details

Defined in Futhark.Transform.Rename

Simplifiable PrimType Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

data FloatType Source #

A floating point type.

Constructors

Float16 
Float32 
Float64 

data IntType Source #

An integer type, ordered by size. Note that signedness is not a property of the type, but a property of the operations performed on values of these types.

Constructors

Int8 
Int16 
Int32 
Int64 

Instances

Instances details
Bounded IntType Source # 
Instance details

Defined in Futhark.IR.Primitive

Enum IntType Source # 
Instance details

Defined in Futhark.IR.Primitive

Eq IntType Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

(==) :: IntType -> IntType -> Bool #

(/=) :: IntType -> IntType -> Bool #

Ord IntType Source # 
Instance details

Defined in Futhark.IR.Primitive

Show IntType Source # 
Instance details

Defined in Futhark.IR.Primitive

Pretty IntType Source # 
Instance details

Defined in Futhark.IR.Primitive

Methods

ppr :: IntType -> Doc #

pprPrec :: Int -> IntType -> Doc #

pprList :: [IntType] -> Doc #

allIntTypes :: [IntType] Source #

A list of all integer types.

allFloatTypes :: [FloatType] Source #

A list of all floating-point types.

allPrimTypes :: [PrimType] Source #

A list of all primitive types.

intValue :: Integral int => IntType -> int -> IntValue Source #

Create an IntValue from a type and an Integer.

intValueType :: IntValue -> IntType Source #

The type of an integer value.

valueIntegral :: Integral int => IntValue -> int Source #

Convert an IntValue to any Integral type.

floatValue :: Real num => FloatType -> num -> FloatValue Source #

Create a FloatValue from a type and a Rational.

floatValueType :: FloatValue -> FloatType Source #

The type of a floating-point value.

primValueType :: PrimValue -> PrimType Source #

The type of a basic value.

blankPrimValue :: PrimType -> PrimValue Source #

A "blank" value of the given primitive type - this is zero, or whatever is close to it. Don't depend on this value, but use it for e.g. creating arrays to be populated by do-loops.

allUnOps :: [UnOp] Source #

A list of all unary operators for all types.

allBinOps :: [BinOp] Source #

A list of all binary operators for all types.

allCmpOps :: [CmpOp] Source #

A list of all comparison operators for all types.

allConvOps :: [ConvOp] Source #

A list of all conversion operators for all types.

doUnOp :: UnOp -> PrimValue -> Maybe PrimValue Source #

Apply an UnOp to an operand. Returns Nothing if the application is mistyped.

doComplement :: IntValue -> IntValue Source #

E.g., ~(~1) = 1.

doAbs :: IntValue -> IntValue Source #

abs(-2) = 2.

doFAbs :: FloatValue -> FloatValue Source #

abs(-2.0) = 2.0.

doSSignum :: IntValue -> IntValue Source #

ssignum(-2) = -1.

doUSignum :: IntValue -> IntValue Source #

usignum(-2) = -1.

doBinOp :: BinOp -> PrimValue -> PrimValue -> Maybe PrimValue Source #

Apply a BinOp to an operand. Returns Nothing if the application is mistyped, or outside the domain (e.g. division by zero).

doAdd :: IntValue -> IntValue -> IntValue Source #

Integer addition.

doMul :: IntValue -> IntValue -> IntValue Source #

Integer multiplication.

doSDiv :: IntValue -> IntValue -> Maybe IntValue Source #

Signed integer division. Rounds towards negativity infinity. Note: this is different from LLVM.

doSMod :: IntValue -> IntValue -> Maybe IntValue Source #

Signed integer modulus; the countepart to SDiv.

doPow :: IntValue -> IntValue -> Maybe IntValue Source #

Signed integer exponentatation.

doConvOp :: ConvOp -> PrimValue -> Maybe PrimValue Source #

Apply a ConvOp to an operand. Returns Nothing if the application is mistyped.

flipConvOp :: ConvOp -> ConvOp Source #

Turn the conversion the other way around. Note that most conversions are lossy, so there is no guarantee the value will round-trip.

doZExt :: IntValue -> IntType -> IntValue Source #

Zero-extend the given integer value to the size of the given type. If the type is smaller than the given value, the result is a truncation.

doSExt :: IntValue -> IntType -> IntValue Source #

Sign-extend the given integer value to the size of the given type. If the type is smaller than the given value, the result is a truncation.

doFPConv :: FloatValue -> FloatType -> FloatValue Source #

Convert the former floating-point type to the latter.

doFPToUI :: FloatValue -> IntType -> IntValue Source #

Convert a floating-point value to the nearest unsigned integer (rounding towards zero).

doFPToSI :: FloatValue -> IntType -> IntValue Source #

Convert a floating-point value to the nearest signed integer (rounding towards zero).

doUIToFP :: IntValue -> FloatType -> FloatValue Source #

Convert an unsigned integer to a floating-point value.

doSIToFP :: IntValue -> FloatType -> FloatValue Source #

Convert a signed integer to a floating-point value.

doCmpOp :: CmpOp -> PrimValue -> PrimValue -> Maybe Bool Source #

Apply a CmpOp to an operand. Returns Nothing if the application is mistyped.

doCmpEq :: PrimValue -> PrimValue -> Bool Source #

Compare any two primtive values for exact equality.

doCmpUlt :: IntValue -> IntValue -> Bool Source #

Unsigned less than.

doCmpUle :: IntValue -> IntValue -> Bool Source #

Unsigned less than or equal.

doCmpSlt :: IntValue -> IntValue -> Bool Source #

Signed less than.

doCmpSle :: IntValue -> IntValue -> Bool Source #

Signed less than or equal.

doFCmpLt :: FloatValue -> FloatValue -> Bool Source #

Floating-point less than.

doFCmpLe :: FloatValue -> FloatValue -> Bool Source #

Floating-point less than or equal.

intToWord64 :: IntValue -> Word64 Source #

Translate an IntValue to Word64. This is guaranteed to fit.

intToInt64 :: IntValue -> Int64 Source #

Translate an IntValue to Int64. This is guaranteed to fit.

binOpType :: BinOp -> PrimType Source #

The result type of a binary operator.

cmpOpType :: CmpOp -> PrimType Source #

The operand types of a comparison operator.

unOpType :: UnOp -> PrimType Source #

The operand and result type of a unary operator.

convOpType :: ConvOp -> (PrimType, PrimType) Source #

The input and output types of a conversion operator.

primFuns :: Map String ([PrimType], PrimType, [PrimValue] -> Maybe PrimValue) Source #

A mapping from names of primitive functions to their parameter types, their result type, and a function for evaluating them.

zeroIsh :: PrimValue -> Bool Source #

Is the given value kind of zero?

oneIsh :: PrimValue -> Bool Source #

Is the given value kind of one?

negativeIsh :: PrimValue -> Bool Source #

Is the given value kind of negative?

zeroIshInt :: IntValue -> Bool Source #

Is the given integer value kind of zero?

oneIshInt :: IntValue -> Bool Source #

Is the given integer value kind of one?

primBitSize :: PrimType -> Int Source #

The size of a value of a given primitive type in bites.

primByteSize :: Num a => PrimType -> a Source #

The size of a value of a given primitive type in eight-bit bytes.

intByteSize :: Num a => IntType -> a Source #

The size of a value of a given integer type in eight-bit bytes.

floatByteSize :: Num a => FloatType -> a Source #

The size of a value of a given floating-point type in eight-bit bytes.

commutativeBinOp :: BinOp -> Bool Source #

True if the given binary operator is commutative.

convOpFun :: ConvOp -> String Source #

The human-readable name for a ConvOp. This is used to expose the ConvOp in the intrinsics module of a Futhark program.

prettySigned :: Bool -> PrimType -> String Source #

True if signed. Only makes a difference for integer types.

data VName Source #

A name tagged with some integer. Only the integer is used in comparisons, no matter the type of vn.

Constructors

VName !Name !Int 

Instances

Instances details
Eq VName Source # 
Instance details

Defined in Language.Futhark.Core

Methods

(==) :: VName -> VName -> Bool #

(/=) :: VName -> VName -> Bool #

Ord VName Source # 
Instance details

Defined in Language.Futhark.Core

Methods

compare :: VName -> VName -> Ordering #

(<) :: VName -> VName -> Bool #

(<=) :: VName -> VName -> Bool #

(>) :: VName -> VName -> Bool #

(>=) :: VName -> VName -> Bool #

max :: VName -> VName -> VName #

min :: VName -> VName -> VName #

Show VName Source # 
Instance details

Defined in Language.Futhark.Core

Methods

showsPrec :: Int -> VName -> ShowS #

show :: VName -> String #

showList :: [VName] -> ShowS #

ToIdent VName Source # 
Instance details

Defined in Futhark.CodeGen.Backends.SimpleRep

Methods

toIdent :: VName -> SrcLoc -> Id #

ToExp VName Source # 
Instance details

Defined in Futhark.CodeGen.Backends.SimpleRep

Methods

toExp :: VName -> SrcLoc -> Exp #

Pretty VName Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

ppr :: VName -> Doc #

pprPrec :: Int -> VName -> Doc #

pprList :: [VName] -> Doc #

FreeIn VName Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: VName -> FV Source #

Substitute VName Source # 
Instance details

Defined in Futhark.Transform.Substitute

Rename VName Source # 
Instance details

Defined in Futhark.Transform.Rename

ToExp VName Source # 
Instance details

Defined in Futhark.Construct

Methods

toExp :: MonadBuilder m => VName -> m (Exp (Rep m)) Source #

Simplifiable VName Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

IsName VName Source #

Depending on the environment variable FUTHARK_COMPILER_DEBUGGING, VNames are printed as either the name with an internal tag, or just the base name.

Instance details

Defined in Language.Futhark.Pretty

Methods

pprName :: VName -> Doc Source #

ASTMappable StructType Source # 
Instance details

Defined in Language.Futhark.Traversals

ASTMappable PatType Source # 
Instance details

Defined in Language.Futhark.Traversals

Methods

astMap :: Monad m => ASTMapper m -> PatType -> m PatType Source #

Substitutable Pat Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Types

Methods

applySubst :: TypeSubs -> Pat -> Pat Source #

Scoped rep (VName, NameInfo rep) Source # 
Instance details

Defined in Futhark.IR.Prop.Scope

Methods

scopeOf :: (VName, NameInfo rep) -> Scope rep Source #

(Applicative m, Monad m, RepTypes rep) => LocalScope rep (ReaderT (Scope rep) m) Source # 
Instance details

Defined in Futhark.IR.Prop.Scope

Methods

localScope :: Scope rep -> ReaderT (Scope rep) m a -> ReaderT (Scope rep) m a Source #

(Applicative m, Monad m, RepTypes rep) => HasScope rep (ReaderT (Scope rep) m) Source # 
Instance details

Defined in Futhark.IR.Prop.Scope

Methods

lookupType :: VName -> ReaderT (Scope rep) m Type Source #

lookupInfo :: VName -> ReaderT (Scope rep) m (NameInfo rep) Source #

askScope :: ReaderT (Scope rep) m (Scope rep) Source #

asksScope :: (Scope rep -> a) -> ReaderT (Scope rep) m a Source #

(Applicative m, Monad m, Monoid w, RepTypes rep) => LocalScope rep (RWST (Scope rep) w s m) Source # 
Instance details

Defined in Futhark.IR.Prop.Scope

Methods

localScope :: Scope rep -> RWST (Scope rep) w s m a -> RWST (Scope rep) w s m a Source #

(Applicative m, Monad m, Monoid w, RepTypes rep) => LocalScope rep (RWST (Scope rep) w s m) Source # 
Instance details

Defined in Futhark.IR.Prop.Scope

Methods

localScope :: Scope rep -> RWST (Scope rep) w s m a -> RWST (Scope rep) w s m a Source #

(Applicative m, Monad m, Monoid w, RepTypes rep) => HasScope rep (RWST (Scope rep) w s m) Source # 
Instance details

Defined in Futhark.IR.Prop.Scope

Methods

lookupType :: VName -> RWST (Scope rep) w s m Type Source #

lookupInfo :: VName -> RWST (Scope rep) w s m (NameInfo rep) Source #

askScope :: RWST (Scope rep) w s m (Scope rep) Source #

asksScope :: (Scope rep -> a) -> RWST (Scope rep) w s m a Source #

(Applicative m, Monad m, Monoid w, RepTypes rep) => HasScope rep (RWST (Scope rep) w s m) Source # 
Instance details

Defined in Futhark.IR.Prop.Scope

Methods

lookupType :: VName -> RWST (Scope rep) w s m Type Source #

lookupInfo :: VName -> RWST (Scope rep) w s m (NameInfo rep) Source #

askScope :: RWST (Scope rep) w s m (Scope rep) Source #

asksScope :: (Scope rep -> a) -> RWST (Scope rep) w s m a Source #

Eq (QualName VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Eq (TypeArgExp VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Eq (TypeExp VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Eq (DimExp VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Eq (DimDecl VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (QualName VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (TypeArgExp VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (TypeExp VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (DimExp VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (DimDecl VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

ArrayDim (DimDecl VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

ASTMappable (TypeParamBase VName) Source # 
Instance details

Defined in Language.Futhark.Traversals

ASTMappable (SizeBinder VName) Source # 
Instance details

Defined in Language.Futhark.Traversals

ASTMappable (TypeArgExp VName) Source # 
Instance details

Defined in Language.Futhark.Traversals

ASTMappable (TypeExp VName) Source # 
Instance details

Defined in Language.Futhark.Traversals

Methods

astMap :: Monad m => ASTMapper m -> TypeExp VName -> m (TypeExp VName) Source #

ASTMappable (DimExp VName) Source # 
Instance details

Defined in Language.Futhark.Traversals

Methods

astMap :: Monad m => ASTMapper m -> DimExp VName -> m (DimExp VName) Source #

ASTMappable (DimDecl VName) Source # 
Instance details

Defined in Language.Futhark.Traversals

Methods

astMap :: Monad m => ASTMapper m -> DimDecl VName -> m (DimDecl VName) Source #

ToExp (PrimExp VName) Source # 
Instance details

Defined in Futhark.CodeGen.ImpGen

Substitutable (DimDecl VName) Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Types

Monad m => MonadReader (Scope rep) (ExtendedScope rep m) Source # 
Instance details

Defined in Futhark.IR.Prop.Scope

Methods

ask :: ExtendedScope rep m (Scope rep) #

local :: (Scope rep -> Scope rep) -> ExtendedScope rep m a -> ExtendedScope rep m a #

reader :: (Scope rep -> a) -> ExtendedScope rep m a #

Eq (PatBase NoInfo VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Eq (LoopFormBase NoInfo VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Eq (CaseBase NoInfo VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Eq (FieldBase NoInfo VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Eq (ExpBase NoInfo VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Eq (AppExpBase NoInfo VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Eq (DimIndexBase NoInfo VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Eq (TypeDeclBase NoInfo VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (PatBase NoInfo VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (LoopFormBase NoInfo VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (CaseBase NoInfo VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (FieldBase NoInfo VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (ExpBase NoInfo VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (AppExpBase NoInfo VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (DimIndexBase NoInfo VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (TypeDeclBase NoInfo VName) Source # 
Instance details

Defined in Language.Futhark.Syntax

ASTMappable (PatBase Info VName) Source # 
Instance details

Defined in Language.Futhark.Traversals

ASTMappable (LoopFormBase Info VName) Source # 
Instance details

Defined in Language.Futhark.Traversals

ASTMappable (CaseBase Info VName) Source # 
Instance details

Defined in Language.Futhark.Traversals

ASTMappable (FieldBase Info VName) Source # 
Instance details

Defined in Language.Futhark.Traversals

ASTMappable (ExpBase Info VName) Source # 
Instance details

Defined in Language.Futhark.Traversals

ASTMappable (AppExpBase Info VName) Source # 
Instance details

Defined in Language.Futhark.Traversals

ASTMappable (DimIndexBase Info VName) Source # 
Instance details

Defined in Language.Futhark.Traversals

ASTMappable (IdentBase Info VName) Source # 
Instance details

Defined in Language.Futhark.Traversals

ASTMappable (TypeDeclBase Info VName) Source # 
Instance details

Defined in Language.Futhark.Traversals

Substitutable (TypeBase (DimDecl VName) ()) Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Types

Substitutable (TypeBase (DimDecl VName) Aliasing) Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Types

data Name Source #

The abstract (not really) type representing names in the Futhark compiler. Strings, being lists of characters, are very slow, while Texts are based on byte-arrays.

Instances

Instances details
Eq Name Source # 
Instance details

Defined in Language.Futhark.Core

Methods

(==) :: Name -> Name -> Bool #

(/=) :: Name -> Name -> Bool #

Ord Name Source # 
Instance details

Defined in Language.Futhark.Core

Methods

compare :: Name -> Name -> Ordering #

(<) :: Name -> Name -> Bool #

(<=) :: Name -> Name -> Bool #

(>) :: Name -> Name -> Bool #

(>=) :: Name -> Name -> Bool #

max :: Name -> Name -> Name #

min :: Name -> Name -> Name #

Show Name Source # 
Instance details

Defined in Language.Futhark.Core

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

IsString Name Source # 
Instance details

Defined in Language.Futhark.Core

Methods

fromString :: String -> Name #

Semigroup Name Source # 
Instance details

Defined in Language.Futhark.Core

Methods

(<>) :: Name -> Name -> Name #

sconcat :: NonEmpty Name -> Name #

stimes :: Integral b => b -> Name -> Name #

ToIdent Name Source # 
Instance details

Defined in Futhark.CodeGen.Backends.SimpleRep

Methods

toIdent :: Name -> SrcLoc -> Id #

Pretty Name Source # 
Instance details

Defined in Language.Futhark.Core

Methods

ppr :: Name -> Doc #

pprPrec :: Int -> Name -> Doc #

pprList :: [Name] -> Doc #

IsName Name Source # 
Instance details

Defined in Language.Futhark.Pretty

Methods

pprName :: Name -> Doc Source #

Eq (QualName Name) Source # 
Instance details

Defined in Language.Futhark.Syntax

Eq (TypeArgExp Name) Source # 
Instance details

Defined in Language.Futhark.Syntax

Eq (TypeExp Name) Source # 
Instance details

Defined in Language.Futhark.Syntax

Eq (DimExp Name) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (QualName Name) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (TypeArgExp Name) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (TypeExp Name) Source # 
Instance details

Defined in Language.Futhark.Syntax

Ord (DimExp Name) Source # 
Instance details

Defined in Language.Futhark.Syntax

data Uniqueness Source #

The uniqueness attribute of a type. This essentially indicates whether or not in-place modifications are acceptable. With respect to ordering, Unique is greater than Nonunique.

Constructors

Nonunique

May have references outside current function.

Unique

No references outside current function.

Instances

Instances details
Eq Uniqueness Source # 
Instance details

Defined in Language.Futhark.Core

Ord Uniqueness Source # 
Instance details

Defined in Language.Futhark.Core

Show Uniqueness Source # 
Instance details

Defined in Language.Futhark.Core

Semigroup Uniqueness Source # 
Instance details

Defined in Language.Futhark.Core

Monoid Uniqueness Source # 
Instance details

Defined in Language.Futhark.Core

Pretty Uniqueness Source # 
Instance details

Defined in Language.Futhark.Core

DeclExtTyped DeclExtType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

DeclTyped DeclType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Typed DeclType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

typeOf :: DeclType -> Type Source #

IsRetType DeclExtType Source # 
Instance details

Defined in Futhark.IR.RetType

IsRetType FunReturns Source # 
Instance details

Defined in Futhark.IR.Mem

Simplifiable [FunReturns] Source # 
Instance details

Defined in Futhark.IR.Mem

FixExt ret => DeclExtTyped (MemInfo ExtSize Uniqueness ret) Source # 
Instance details

Defined in Futhark.IR.Mem

DeclTyped (MemInfo SubExp Uniqueness ret) Source # 
Instance details

Defined in Futhark.IR.Mem

Typed (MemInfo SubExp Uniqueness ret) Source # 
Instance details

Defined in Futhark.IR.Mem

defaultEntryPoint :: Name Source #

The name of the default program entry point (main).

nameToString :: Name -> String Source #

Convert a name to the corresponding list of characters.

nameFromString :: String -> Name Source #

Convert a list of characters to the corresponding name.

nameToText :: Name -> Text Source #

Convert a name to the corresponding Text.

nameFromText :: Text -> Name Source #

Convert a Text to the corresponding name.

locStr :: Located a => a -> String Source #

A human-readable location string, of the form filename:lineno:columnno. This follows the GNU coding standards for error messages: https://www.gnu.org/prep/standards/html_node/Errors.html

This function assumes that both start and end position is in the same file (it is not clear what the alternative would even mean).

locStrRel :: (Located a, Located b) => a -> b -> String Source #

Like locStr, but locStrRel prev now prints the location now with the file name left out if the same as prev. This is useful when printing messages that are all in the context of some initially printed location (e.g. the first mention contains the file name; the rest just line and column name).

prettyStacktrace :: Int -> [String] -> String Source #

Given a list of strings representing entries in the stack trace and the index of the frame to highlight, produce a final newline-terminated string for showing to the user. This string should also be preceded by a newline. The most recent stack frame must come first in the list.

baseTag :: VName -> Int Source #

Return the tag contained in the VName.

baseName :: VName -> Name Source #

Return the name contained in the VName.

baseString :: VName -> String Source #

Return the base Name converted to a string.

quote :: String -> String Source #

Enclose a string in the prefered quotes used in error messages. These are picked to not collide with characters permitted in identifiers.

pquote :: Doc -> Doc Source #

As quote, but works on prettyprinted representation.

data ErrorMsgPart a Source #

A part of an error message.

Constructors

ErrorString String

A literal string.

ErrorVal PrimType a

A run-time value.

Instances

Instances details
Functor ErrorMsgPart Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fmap :: (a -> b) -> ErrorMsgPart a -> ErrorMsgPart b #

(<$) :: a -> ErrorMsgPart b -> ErrorMsgPart a #

Foldable ErrorMsgPart Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fold :: Monoid m => ErrorMsgPart m -> m #

foldMap :: Monoid m => (a -> m) -> ErrorMsgPart a -> m #

foldMap' :: Monoid m => (a -> m) -> ErrorMsgPart a -> m #

foldr :: (a -> b -> b) -> b -> ErrorMsgPart a -> b #

foldr' :: (a -> b -> b) -> b -> ErrorMsgPart a -> b #

foldl :: (b -> a -> b) -> b -> ErrorMsgPart a -> b #

foldl' :: (b -> a -> b) -> b -> ErrorMsgPart a -> b #

foldr1 :: (a -> a -> a) -> ErrorMsgPart a -> a #

foldl1 :: (a -> a -> a) -> ErrorMsgPart a -> a #

toList :: ErrorMsgPart a -> [a] #

null :: ErrorMsgPart a -> Bool #

length :: ErrorMsgPart a -> Int #

elem :: Eq a => a -> ErrorMsgPart a -> Bool #

maximum :: Ord a => ErrorMsgPart a -> a #

minimum :: Ord a => ErrorMsgPart a -> a #

sum :: Num a => ErrorMsgPart a -> a #

product :: Num a => ErrorMsgPart a -> a #

Traversable ErrorMsgPart Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

traverse :: Applicative f => (a -> f b) -> ErrorMsgPart a -> f (ErrorMsgPart b) #

sequenceA :: Applicative f => ErrorMsgPart (f a) -> f (ErrorMsgPart a) #

mapM :: Monad m => (a -> m b) -> ErrorMsgPart a -> m (ErrorMsgPart b) #

sequence :: Monad m => ErrorMsgPart (m a) -> m (ErrorMsgPart a) #

Eq a => Eq (ErrorMsgPart a) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Ord a => Ord (ErrorMsgPart a) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Show a => Show (ErrorMsgPart a) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

IsString (ErrorMsgPart a) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

newtype ErrorMsg a Source #

An error message is a list of error parts, which are concatenated to form the final message.

Constructors

ErrorMsg [ErrorMsgPart a] 

Instances

Instances details
Functor ErrorMsg Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fmap :: (a -> b) -> ErrorMsg a -> ErrorMsg b #

(<$) :: a -> ErrorMsg b -> ErrorMsg a #

Foldable ErrorMsg Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fold :: Monoid m => ErrorMsg m -> m #

foldMap :: Monoid m => (a -> m) -> ErrorMsg a -> m #

foldMap' :: Monoid m => (a -> m) -> ErrorMsg a -> m #

foldr :: (a -> b -> b) -> b -> ErrorMsg a -> b #

foldr' :: (a -> b -> b) -> b -> ErrorMsg a -> b #

foldl :: (b -> a -> b) -> b -> ErrorMsg a -> b #

foldl' :: (b -> a -> b) -> b -> ErrorMsg a -> b #

foldr1 :: (a -> a -> a) -> ErrorMsg a -> a #

foldl1 :: (a -> a -> a) -> ErrorMsg a -> a #

toList :: ErrorMsg a -> [a] #

null :: ErrorMsg a -> Bool #

length :: ErrorMsg a -> Int #

elem :: Eq a => a -> ErrorMsg a -> Bool #

maximum :: Ord a => ErrorMsg a -> a #

minimum :: Ord a => ErrorMsg a -> a #

sum :: Num a => ErrorMsg a -> a #

product :: Num a => ErrorMsg a -> a #

Traversable ErrorMsg Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

traverse :: Applicative f => (a -> f b) -> ErrorMsg a -> f (ErrorMsg b) #

sequenceA :: Applicative f => ErrorMsg (f a) -> f (ErrorMsg a) #

mapM :: Monad m => (a -> m b) -> ErrorMsg a -> m (ErrorMsg b) #

sequence :: Monad m => ErrorMsg (m a) -> m (ErrorMsg a) #

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

Defined in Futhark.IR.Syntax.Core

Methods

(==) :: ErrorMsg a -> ErrorMsg a -> Bool #

(/=) :: ErrorMsg a -> ErrorMsg a -> Bool #

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

Defined in Futhark.IR.Syntax.Core

Methods

compare :: ErrorMsg a -> ErrorMsg a -> Ordering #

(<) :: ErrorMsg a -> ErrorMsg a -> Bool #

(<=) :: ErrorMsg a -> ErrorMsg a -> Bool #

(>) :: ErrorMsg a -> ErrorMsg a -> Bool #

(>=) :: ErrorMsg a -> ErrorMsg a -> Bool #

max :: ErrorMsg a -> ErrorMsg a -> ErrorMsg a #

min :: ErrorMsg a -> ErrorMsg a -> ErrorMsg a #

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

Defined in Futhark.IR.Syntax.Core

Methods

showsPrec :: Int -> ErrorMsg a -> ShowS #

show :: ErrorMsg a -> String #

showList :: [ErrorMsg a] -> ShowS #

IsString (ErrorMsg a) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fromString :: String -> ErrorMsg a #

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

Defined in Futhark.IR.Pretty

Methods

ppr :: ErrorMsg a -> Doc #

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

pprList :: [ErrorMsg a] -> Doc #

data PatElemT dec Source #

An element of a pattern - consisting of a name and an addditional parametric decoration. This decoration is what is expected to contain the type of the resulting variable.

Instances

Instances details
Functor PatElemT Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fmap :: (a -> b) -> PatElemT a -> PatElemT b #

(<$) :: a -> PatElemT b -> PatElemT a #

Foldable PatElemT Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fold :: Monoid m => PatElemT m -> m #

foldMap :: Monoid m => (a -> m) -> PatElemT a -> m #

foldMap' :: Monoid m => (a -> m) -> PatElemT a -> m #

foldr :: (a -> b -> b) -> b -> PatElemT a -> b #

foldr' :: (a -> b -> b) -> b -> PatElemT a -> b #

foldl :: (b -> a -> b) -> b -> PatElemT a -> b #

foldl' :: (b -> a -> b) -> b -> PatElemT a -> b #

foldr1 :: (a -> a -> a) -> PatElemT a -> a #

foldl1 :: (a -> a -> a) -> PatElemT a -> a #

toList :: PatElemT a -> [a] #

null :: PatElemT a -> Bool #

length :: PatElemT a -> Int #

elem :: Eq a => a -> PatElemT a -> Bool #

maximum :: Ord a => PatElemT a -> a #

minimum :: Ord a => PatElemT a -> a #

sum :: Num a => PatElemT a -> a #

product :: Num a => PatElemT a -> a #

Traversable PatElemT Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

traverse :: Applicative f => (a -> f b) -> PatElemT a -> f (PatElemT b) #

sequenceA :: Applicative f => PatElemT (f a) -> f (PatElemT a) #

mapM :: Monad m => (a -> m b) -> PatElemT a -> m (PatElemT b) #

sequence :: Monad m => PatElemT (m a) -> m (PatElemT a) #

Eq dec => Eq (PatElemT dec) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

(==) :: PatElemT dec -> PatElemT dec -> Bool #

(/=) :: PatElemT dec -> PatElemT dec -> Bool #

Ord dec => Ord (PatElemT dec) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

compare :: PatElemT dec -> PatElemT dec -> Ordering #

(<) :: PatElemT dec -> PatElemT dec -> Bool #

(<=) :: PatElemT dec -> PatElemT dec -> Bool #

(>) :: PatElemT dec -> PatElemT dec -> Bool #

(>=) :: PatElemT dec -> PatElemT dec -> Bool #

max :: PatElemT dec -> PatElemT dec -> PatElemT dec #

min :: PatElemT dec -> PatElemT dec -> PatElemT dec #

Show dec => Show (PatElemT dec) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

showsPrec :: Int -> PatElemT dec -> ShowS #

show :: PatElemT dec -> String #

showList :: [PatElemT dec] -> ShowS #

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

Defined in Futhark.IR.Pretty

Methods

ppr :: PatElemT t -> Doc #

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

pprList :: [PatElemT t] -> Doc #

SetType dec => SetType (PatElemT dec) Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

setType :: PatElemT dec -> Type -> PatElemT dec Source #

Typed dec => Typed (PatElemT dec) Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

typeOf :: PatElemT dec -> Type Source #

FreeIn dec => FreeIn (PatElemT dec) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: PatElemT dec -> FV Source #

Substitute dec => Substitute (PatElemT dec) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Rename dec => Rename (PatElemT dec) Source # 
Instance details

Defined in Futhark.Transform.Rename

Methods

rename :: PatElemT dec -> RenameM (PatElemT dec) Source #

AliasesOf dec => AliasesOf (PatElemT dec) Source # 
Instance details

Defined in Futhark.IR.Prop.Aliases

Methods

aliasesOf :: PatElemT dec -> Names Source #

data FlatSlice d Source #

Constructors

FlatSlice d [FlatDimIndex d] 

Instances

Instances details
Functor FlatSlice Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fmap :: (a -> b) -> FlatSlice a -> FlatSlice b #

(<$) :: a -> FlatSlice b -> FlatSlice a #

Foldable FlatSlice Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fold :: Monoid m => FlatSlice m -> m #

foldMap :: Monoid m => (a -> m) -> FlatSlice a -> m #

foldMap' :: Monoid m => (a -> m) -> FlatSlice a -> m #

foldr :: (a -> b -> b) -> b -> FlatSlice a -> b #

foldr' :: (a -> b -> b) -> b -> FlatSlice a -> b #

foldl :: (b -> a -> b) -> b -> FlatSlice a -> b #

foldl' :: (b -> a -> b) -> b -> FlatSlice a -> b #

foldr1 :: (a -> a -> a) -> FlatSlice a -> a #

foldl1 :: (a -> a -> a) -> FlatSlice a -> a #

toList :: FlatSlice a -> [a] #

null :: FlatSlice a -> Bool #

length :: FlatSlice a -> Int #

elem :: Eq a => a -> FlatSlice a -> Bool #

maximum :: Ord a => FlatSlice a -> a #

minimum :: Ord a => FlatSlice a -> a #

sum :: Num a => FlatSlice a -> a #

product :: Num a => FlatSlice a -> a #

Traversable FlatSlice Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

traverse :: Applicative f => (a -> f b) -> FlatSlice a -> f (FlatSlice b) #

sequenceA :: Applicative f => FlatSlice (f a) -> f (FlatSlice a) #

mapM :: Monad m => (a -> m b) -> FlatSlice a -> m (FlatSlice b) #

sequence :: Monad m => FlatSlice (m a) -> m (FlatSlice a) #

Eq d => Eq (FlatSlice d) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

(==) :: FlatSlice d -> FlatSlice d -> Bool #

(/=) :: FlatSlice d -> FlatSlice d -> Bool #

Ord d => Ord (FlatSlice d) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Show d => Show (FlatSlice d) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

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

Defined in Futhark.IR.Pretty

Methods

ppr :: FlatSlice a -> Doc #

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

pprList :: [FlatSlice a] -> Doc #

FreeIn d => FreeIn (FlatSlice d) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: FlatSlice d -> FV Source #

Substitute d => Substitute (FlatSlice d) Source # 
Instance details

Defined in Futhark.Transform.Substitute

data FlatDimIndex d Source #

Constructors

FlatDimIndex 

Fields

  • d

    Number of elements in dimension

  • d

    Stride of dimension

Instances

Instances details
Functor FlatDimIndex Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fmap :: (a -> b) -> FlatDimIndex a -> FlatDimIndex b #

(<$) :: a -> FlatDimIndex b -> FlatDimIndex a #

Foldable FlatDimIndex Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fold :: Monoid m => FlatDimIndex m -> m #

foldMap :: Monoid m => (a -> m) -> FlatDimIndex a -> m #

foldMap' :: Monoid m => (a -> m) -> FlatDimIndex a -> m #

foldr :: (a -> b -> b) -> b -> FlatDimIndex a -> b #

foldr' :: (a -> b -> b) -> b -> FlatDimIndex a -> b #

foldl :: (b -> a -> b) -> b -> FlatDimIndex a -> b #

foldl' :: (b -> a -> b) -> b -> FlatDimIndex a -> b #

foldr1 :: (a -> a -> a) -> FlatDimIndex a -> a #

foldl1 :: (a -> a -> a) -> FlatDimIndex a -> a #

toList :: FlatDimIndex a -> [a] #

null :: FlatDimIndex a -> Bool #

length :: FlatDimIndex a -> Int #

elem :: Eq a => a -> FlatDimIndex a -> Bool #

maximum :: Ord a => FlatDimIndex a -> a #

minimum :: Ord a => FlatDimIndex a -> a #

sum :: Num a => FlatDimIndex a -> a #

product :: Num a => FlatDimIndex a -> a #

Traversable FlatDimIndex Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

traverse :: Applicative f => (a -> f b) -> FlatDimIndex a -> f (FlatDimIndex b) #

sequenceA :: Applicative f => FlatDimIndex (f a) -> f (FlatDimIndex a) #

mapM :: Monad m => (a -> m b) -> FlatDimIndex a -> m (FlatDimIndex b) #

sequence :: Monad m => FlatDimIndex (m a) -> m (FlatDimIndex a) #

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

Defined in Futhark.IR.Syntax.Core

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

Defined in Futhark.IR.Syntax.Core

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

Defined in Futhark.IR.Syntax.Core

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

Defined in Futhark.IR.Pretty

Methods

ppr :: FlatDimIndex d -> Doc #

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

pprList :: [FlatDimIndex d] -> Doc #

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

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: FlatDimIndex d -> FV Source #

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

Defined in Futhark.Transform.Substitute

newtype Slice d Source #

A list of DimIndexs, indicating how an array should be sliced. Whenever a function accepts a Slice, that slice should be total, i.e, cover all dimensions of the array. Deviators should be indicated by taking a list of DimIndexes instead.

Constructors

Slice 

Fields

Instances

Instances details
Functor Slice Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fmap :: (a -> b) -> Slice a -> Slice b #

(<$) :: a -> Slice b -> Slice a #

Foldable Slice Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fold :: Monoid m => Slice m -> m #

foldMap :: Monoid m => (a -> m) -> Slice a -> m #

foldMap' :: Monoid m => (a -> m) -> Slice a -> m #

foldr :: (a -> b -> b) -> b -> Slice a -> b #

foldr' :: (a -> b -> b) -> b -> Slice a -> b #

foldl :: (b -> a -> b) -> b -> Slice a -> b #

foldl' :: (b -> a -> b) -> b -> Slice a -> b #

foldr1 :: (a -> a -> a) -> Slice a -> a #

foldl1 :: (a -> a -> a) -> Slice a -> a #

toList :: Slice a -> [a] #

null :: Slice a -> Bool #

length :: Slice a -> Int #

elem :: Eq a => a -> Slice a -> Bool #

maximum :: Ord a => Slice a -> a #

minimum :: Ord a => Slice a -> a #

sum :: Num a => Slice a -> a #

product :: Num a => Slice a -> a #

Traversable Slice Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

traverse :: Applicative f => (a -> f b) -> Slice a -> f (Slice b) #

sequenceA :: Applicative f => Slice (f a) -> f (Slice a) #

mapM :: Monad m => (a -> m b) -> Slice a -> m (Slice b) #

sequence :: Monad m => Slice (m a) -> m (Slice a) #

Eq d => Eq (Slice d) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

(==) :: Slice d -> Slice d -> Bool #

(/=) :: Slice d -> Slice d -> Bool #

Ord d => Ord (Slice d) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

compare :: Slice d -> Slice d -> Ordering #

(<) :: Slice d -> Slice d -> Bool #

(<=) :: Slice d -> Slice d -> Bool #

(>) :: Slice d -> Slice d -> Bool #

(>=) :: Slice d -> Slice d -> Bool #

max :: Slice d -> Slice d -> Slice d #

min :: Slice d -> Slice d -> Slice d #

Show d => Show (Slice d) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

showsPrec :: Int -> Slice d -> ShowS #

show :: Slice d -> String #

showList :: [Slice d] -> ShowS #

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

Defined in Futhark.IR.Pretty

Methods

ppr :: Slice a -> Doc #

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

pprList :: [Slice a] -> Doc #

FreeIn d => FreeIn (Slice d) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: Slice d -> FV Source #

Substitute d => Substitute (Slice d) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Simplifiable d => Simplifiable (Slice d) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

Methods

simplify :: SimplifiableRep rep => Slice d -> SimpleM rep (Slice d) Source #

data DimIndex d Source #

How to index a single dimension of an array.

Constructors

DimFix d

Fix index in this dimension.

DimSlice d d d

DimSlice start_offset num_elems stride.

Instances

Instances details
Functor DimIndex Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fmap :: (a -> b) -> DimIndex a -> DimIndex b #

(<$) :: a -> DimIndex b -> DimIndex a #

Foldable DimIndex Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fold :: Monoid m => DimIndex m -> m #

foldMap :: Monoid m => (a -> m) -> DimIndex a -> m #

foldMap' :: Monoid m => (a -> m) -> DimIndex a -> m #

foldr :: (a -> b -> b) -> b -> DimIndex a -> b #

foldr' :: (a -> b -> b) -> b -> DimIndex a -> b #

foldl :: (b -> a -> b) -> b -> DimIndex a -> b #

foldl' :: (b -> a -> b) -> b -> DimIndex a -> b #

foldr1 :: (a -> a -> a) -> DimIndex a -> a #

foldl1 :: (a -> a -> a) -> DimIndex a -> a #

toList :: DimIndex a -> [a] #

null :: DimIndex a -> Bool #

length :: DimIndex a -> Int #

elem :: Eq a => a -> DimIndex a -> Bool #

maximum :: Ord a => DimIndex a -> a #

minimum :: Ord a => DimIndex a -> a #

sum :: Num a => DimIndex a -> a #

product :: Num a => DimIndex a -> a #

Traversable DimIndex Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

traverse :: Applicative f => (a -> f b) -> DimIndex a -> f (DimIndex b) #

sequenceA :: Applicative f => DimIndex (f a) -> f (DimIndex a) #

mapM :: Monad m => (a -> m b) -> DimIndex a -> m (DimIndex b) #

sequence :: Monad m => DimIndex (m a) -> m (DimIndex a) #

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

Defined in Futhark.IR.Syntax.Core

Methods

(==) :: DimIndex d -> DimIndex d -> Bool #

(/=) :: DimIndex d -> DimIndex d -> Bool #

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

Defined in Futhark.IR.Syntax.Core

Methods

compare :: DimIndex d -> DimIndex d -> Ordering #

(<) :: DimIndex d -> DimIndex d -> Bool #

(<=) :: DimIndex d -> DimIndex d -> Bool #

(>) :: DimIndex d -> DimIndex d -> Bool #

(>=) :: DimIndex d -> DimIndex d -> Bool #

max :: DimIndex d -> DimIndex d -> DimIndex d #

min :: DimIndex d -> DimIndex d -> DimIndex d #

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

Defined in Futhark.IR.Syntax.Core

Methods

showsPrec :: Int -> DimIndex d -> ShowS #

show :: DimIndex d -> String #

showList :: [DimIndex d] -> ShowS #

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

Defined in Futhark.IR.Pretty

Methods

ppr :: DimIndex d -> Doc #

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

pprList :: [DimIndex d] -> Doc #

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

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: DimIndex d -> FV Source #

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

Defined in Futhark.Transform.Substitute

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

Defined in Futhark.Transform.Rename

Methods

rename :: DimIndex d -> RenameM (DimIndex d) Source #

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

Defined in Futhark.Optimise.Simplify.Engine

Methods

simplify :: SimplifiableRep rep => DimIndex d -> SimpleM rep (DimIndex d) Source #

data Param dec Source #

A function or lambda parameter.

Constructors

Param 

Fields

Instances

Instances details
Functor Param Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fmap :: (a -> b) -> Param a -> Param b #

(<$) :: a -> Param b -> Param a #

Foldable Param Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fold :: Monoid m => Param m -> m #

foldMap :: Monoid m => (a -> m) -> Param a -> m #

foldMap' :: Monoid m => (a -> m) -> Param a -> m #

foldr :: (a -> b -> b) -> b -> Param a -> b #

foldr' :: (a -> b -> b) -> b -> Param a -> b #

foldl :: (b -> a -> b) -> b -> Param a -> b #

foldl' :: (b -> a -> b) -> b -> Param a -> b #

foldr1 :: (a -> a -> a) -> Param a -> a #

foldl1 :: (a -> a -> a) -> Param a -> a #

toList :: Param a -> [a] #

null :: Param a -> Bool #

length :: Param a -> Int #

elem :: Eq a => a -> Param a -> Bool #

maximum :: Ord a => Param a -> a #

minimum :: Ord a => Param a -> a #

sum :: Num a => Param a -> a #

product :: Num a => Param a -> a #

Traversable Param Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

traverse :: Applicative f => (a -> f b) -> Param a -> f (Param b) #

sequenceA :: Applicative f => Param (f a) -> f (Param a) #

mapM :: Monad m => (a -> m b) -> Param a -> m (Param b) #

sequence :: Monad m => Param (m a) -> m (Param a) #

Eq dec => Eq (Param dec) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

(==) :: Param dec -> Param dec -> Bool #

(/=) :: Param dec -> Param dec -> Bool #

Ord dec => Ord (Param dec) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

compare :: Param dec -> Param dec -> Ordering #

(<) :: Param dec -> Param dec -> Bool #

(<=) :: Param dec -> Param dec -> Bool #

(>) :: Param dec -> Param dec -> Bool #

(>=) :: Param dec -> Param dec -> Bool #

max :: Param dec -> Param dec -> Param dec #

min :: Param dec -> Param dec -> Param dec #

Show dec => Show (Param dec) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

showsPrec :: Int -> Param dec -> ShowS #

show :: Param dec -> String #

showList :: [Param dec] -> ShowS #

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

Defined in Futhark.IR.Pretty

Methods

ppr :: Param t -> Doc #

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

pprList :: [Param t] -> Doc #

DeclTyped dec => DeclTyped (Param dec) Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

declTypeOf :: Param dec -> DeclType Source #

Typed dec => Typed (Param dec) Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

typeOf :: Param dec -> Type Source #

FreeIn dec => FreeIn (Param dec) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: Param dec -> FV Source #

Substitute dec => Substitute (Param dec) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> Param dec -> Param dec Source #

Rename dec => Rename (Param dec) Source # 
Instance details

Defined in Futhark.Transform.Rename

Methods

rename :: Param dec -> RenameM (Param dec) Source #

data SubExp Source #

A subexpression is either a scalar constant or a variable. One important property is that evaluation of a subexpression is guaranteed to complete in constant time.

Constructors

Constant PrimValue 
Var VName 

Instances

Instances details
Eq SubExp Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

(==) :: SubExp -> SubExp -> Bool #

(/=) :: SubExp -> SubExp -> Bool #

Ord SubExp Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Show SubExp Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

ToExp SubExp Source # 
Instance details

Defined in Futhark.CodeGen.Backends.SimpleRep

Methods

toExp :: SubExp -> SrcLoc -> Exp #

Pretty SubExp Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

ppr :: SubExp -> Doc #

pprPrec :: Int -> SubExp -> Doc #

pprList :: [SubExp] -> Doc #

Pretty ExtShape Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

ppr :: ExtShape -> Doc #

pprPrec :: Int -> ExtShape -> Doc #

pprList :: [ExtShape] -> Doc #

Pretty Shape Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

ppr :: Shape -> Doc #

pprPrec :: Int -> Shape -> Doc #

pprList :: [Shape] -> Doc #

FixExt ExtSize Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

fixExt :: Int -> SubExp -> ExtSize -> ExtSize Source #

SetType Type Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

setType :: Type -> Type -> Type Source #

DeclExtTyped DeclExtType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

ExtTyped ExtType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

DeclTyped DeclType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Typed DeclType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

typeOf :: DeclType -> Type Source #

Typed Type Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

typeOf :: Type -> Type Source #

IsRetType DeclExtType Source # 
Instance details

Defined in Futhark.IR.RetType

IsRetType FunReturns Source # 
Instance details

Defined in Futhark.IR.Mem

IsBodyType ExtType Source # 
Instance details

Defined in Futhark.IR.RetType

IsBodyType BodyReturns Source # 
Instance details

Defined in Futhark.IR.Mem

FreeIn SubExp Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: SubExp -> FV Source #

Substitute SubExp Source # 
Instance details

Defined in Futhark.Transform.Substitute

Rename SubExp Source # 
Instance details

Defined in Futhark.Transform.Rename

Rename ExtSize Source # 
Instance details

Defined in Futhark.Transform.Rename

ToExp SubExp Source # 
Instance details

Defined in Futhark.Construct

Methods

toExp :: MonadBuilder m => SubExp -> m (Exp (Rep m)) Source #

Simplifiable SubExp Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

Simplifiable ExtSize Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

HasLetDecMem LetDecMem Source # 
Instance details

Defined in Futhark.IR.Mem

ToExp SubExp Source # 
Instance details

Defined in Futhark.CodeGen.ImpGen

ArrayShape (ShapeBase SubExp) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

ArrayShape (ShapeBase ExtSize) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Simplifiable [FunReturns] Source # 
Instance details

Defined in Futhark.IR.Mem

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

Defined in Futhark.IR.Pretty

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

Defined in Futhark.IR.Pretty

Methods

ppr :: TypeBase Shape u -> Doc #

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

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

FixExt ret => FixExt (MemInfo ExtSize u ret) Source # 
Instance details

Defined in Futhark.IR.Mem

Methods

fixExt :: Int -> SubExp -> MemInfo ExtSize u ret -> MemInfo ExtSize u ret Source #

FixExt ret => DeclExtTyped (MemInfo ExtSize Uniqueness ret) Source # 
Instance details

Defined in Futhark.IR.Mem

FixExt ret => ExtTyped (MemInfo ExtSize NoUniqueness ret) Source # 
Instance details

Defined in Futhark.IR.Mem

DeclTyped (MemInfo SubExp Uniqueness ret) Source # 
Instance details

Defined in Futhark.IR.Mem

Typed (MemInfo SubExp Uniqueness ret) Source # 
Instance details

Defined in Futhark.IR.Mem

Typed (MemInfo SubExp NoUniqueness ret) Source # 
Instance details

Defined in Futhark.IR.Mem

newtype Certs Source #

A list of names used for certificates in some expressions.

Constructors

Certs 

Fields

Instances

Instances details
Eq Certs Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

(==) :: Certs -> Certs -> Bool #

(/=) :: Certs -> Certs -> Bool #

Ord Certs Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

compare :: Certs -> Certs -> Ordering #

(<) :: Certs -> Certs -> Bool #

(<=) :: Certs -> Certs -> Bool #

(>) :: Certs -> Certs -> Bool #

(>=) :: Certs -> Certs -> Bool #

max :: Certs -> Certs -> Certs #

min :: Certs -> Certs -> Certs #

Show Certs Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

showsPrec :: Int -> Certs -> ShowS #

show :: Certs -> String #

showList :: [Certs] -> ShowS #

Semigroup Certs Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

(<>) :: Certs -> Certs -> Certs #

sconcat :: NonEmpty Certs -> Certs #

stimes :: Integral b => b -> Certs -> Certs #

Monoid Certs Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

mempty :: Certs #

mappend :: Certs -> Certs -> Certs #

mconcat :: [Certs] -> Certs #

Pretty Certs Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

ppr :: Certs -> Doc #

pprPrec :: Int -> Certs -> Doc #

pprList :: [Certs] -> Doc #

FreeIn Certs Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: Certs -> FV Source #

Substitute Certs Source # 
Instance details

Defined in Futhark.Transform.Substitute

Rename Certs Source # 
Instance details

Defined in Futhark.Transform.Rename

Simplifiable Certs Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

MonadState (VNameSource, Bool, Certs) (SimpleM rep) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

Methods

get :: SimpleM rep (VNameSource, Bool, Certs) #

put :: (VNameSource, Bool, Certs) -> SimpleM rep () #

state :: ((VNameSource, Bool, Certs) -> (a, (VNameSource, Bool, Certs))) -> SimpleM rep a #

data Ident Source #

An identifier consists of its name and the type of the value bound to the identifier.

Constructors

Ident 

Fields

Instances

Instances details
Eq Ident Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

(==) :: Ident -> Ident -> Bool #

(/=) :: Ident -> Ident -> Bool #

Ord Ident Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

compare :: Ident -> Ident -> Ordering #

(<) :: Ident -> Ident -> Bool #

(<=) :: Ident -> Ident -> Bool #

(>) :: Ident -> Ident -> Bool #

(>=) :: Ident -> Ident -> Bool #

max :: Ident -> Ident -> Ident #

min :: Ident -> Ident -> Ident #

Show Ident Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

showsPrec :: Int -> Ident -> ShowS #

show :: Ident -> String #

showList :: [Ident] -> ShowS #

Pretty Ident Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

ppr :: Ident -> Doc #

pprPrec :: Int -> Ident -> Doc #

pprList :: [Ident] -> Doc #

Typed Ident Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

typeOf :: Ident -> Type Source #

FreeIn Ident Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: Ident -> FV Source #

Substitute Ident Source # 
Instance details

Defined in Futhark.Transform.Substitute

Rename Ident Source # 
Instance details

Defined in Futhark.Transform.Rename

data Diet Source #

Information about which parts of a value/type are consumed. For example, we might say that a function taking three arguments of types ([int], *[int], [int]) has diet [Observe, Consume, Observe].

Constructors

Consume

Consumes this value.

Observe

Only observes value in this position, does not consume. A result may alias this.

ObservePrim

As Observe, but the result will not alias, because the parameter does not carry aliases.

Instances

Instances details
Eq Diet Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

(==) :: Diet -> Diet -> Bool #

(/=) :: Diet -> Diet -> Bool #

Ord Diet Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

compare :: Diet -> Diet -> Ordering #

(<) :: Diet -> Diet -> Bool #

(<=) :: Diet -> Diet -> Bool #

(>) :: Diet -> Diet -> Bool #

(>=) :: Diet -> Diet -> Bool #

max :: Diet -> Diet -> Diet #

min :: Diet -> Diet -> Diet #

Show Diet Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

showsPrec :: Int -> Diet -> ShowS #

show :: Diet -> String #

showList :: [Diet] -> ShowS #

type DeclExtType = TypeBase ExtShape Uniqueness Source #

An ExtType with uniqueness information, used for function return types.

type DeclType = TypeBase Shape Uniqueness Source #

A type with shape and uniqueness information, used declaring return- and parameters types.

type ExtType = TypeBase ExtShape NoUniqueness Source #

A type with existentially quantified shapes - used as part of function (and function-like) return types. Generally only makes sense when used in a list.

type Type = TypeBase Shape NoUniqueness Source #

A type with shape information, used for describing the type of variables.

data TypeBase shape u Source #

The type of a value. When comparing types for equality with ==, shapes must match.

Constructors

Prim PrimType 
Acc VName Shape [Type] u

Token, index space, element type, and uniqueness.

Array PrimType shape u 
Mem Space 

Instances

Instances details
Bifunctor TypeBase Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

bimap :: (a -> b) -> (c -> d) -> TypeBase a c -> TypeBase b d #

first :: (a -> b) -> TypeBase a c -> TypeBase b c #

second :: (b -> c) -> TypeBase a b -> TypeBase a c #

Bitraversable TypeBase Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> TypeBase a b -> f (TypeBase c d) #

Bifoldable TypeBase Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

bifold :: Monoid m => TypeBase m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> TypeBase a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> TypeBase a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> TypeBase a b -> c #

SetType Type Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

setType :: Type -> Type -> Type Source #

DeclExtTyped DeclExtType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

ExtTyped ExtType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

DeclTyped DeclType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Typed DeclType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

typeOf :: DeclType -> Type Source #

Typed Type Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

typeOf :: Type -> Type Source #

IsRetType DeclExtType Source # 
Instance details

Defined in Futhark.IR.RetType

IsBodyType ExtType Source # 
Instance details

Defined in Futhark.IR.RetType

(Eq u, Eq shape) => Eq (TypeBase shape u) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

(==) :: TypeBase shape u -> TypeBase shape u -> Bool #

(/=) :: TypeBase shape u -> TypeBase shape u -> Bool #

(Ord u, Ord shape) => Ord (TypeBase shape u) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

compare :: TypeBase shape u -> TypeBase shape u -> Ordering #

(<) :: TypeBase shape u -> TypeBase shape u -> Bool #

(<=) :: TypeBase shape u -> TypeBase shape u -> Bool #

(>) :: TypeBase shape u -> TypeBase shape u -> Bool #

(>=) :: TypeBase shape u -> TypeBase shape u -> Bool #

max :: TypeBase shape u -> TypeBase shape u -> TypeBase shape u #

min :: TypeBase shape u -> TypeBase shape u -> TypeBase shape u #

(Show u, Show shape) => Show (TypeBase shape u) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

showsPrec :: Int -> TypeBase shape u -> ShowS #

show :: TypeBase shape u -> String #

showList :: [TypeBase shape u] -> ShowS #

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

Defined in Futhark.IR.Pretty

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

Defined in Futhark.IR.Pretty

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

Defined in Futhark.IR.Pretty

Methods

ppr :: TypeBase Shape u -> Doc #

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

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

(FixExt shape, ArrayShape shape) => FixExt (TypeBase shape u) Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

fixExt :: Int -> SubExp -> TypeBase shape u -> TypeBase shape u Source #

FreeIn shape => FreeIn (TypeBase shape u) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: TypeBase shape u -> FV Source #

Substitute shape => Substitute (TypeBase shape u) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> TypeBase shape u -> TypeBase shape u Source #

Rename shape => Rename (TypeBase shape u) Source # 
Instance details

Defined in Futhark.Transform.Rename

Methods

rename :: TypeBase shape u -> RenameM (TypeBase shape u) Source #

Simplifiable shape => Simplifiable (TypeBase shape u) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

Methods

simplify :: SimplifiableRep rep => TypeBase shape u -> SimpleM rep (TypeBase shape u) Source #

data NoUniqueness Source #

A fancier name for () - encodes no uniqueness information.

Constructors

NoUniqueness 

Instances

Instances details
Eq NoUniqueness Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Ord NoUniqueness Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Show NoUniqueness Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Semigroup NoUniqueness Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Monoid NoUniqueness Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Pretty NoUniqueness Source # 
Instance details

Defined in Futhark.IR.Pretty

SetType Type Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

setType :: Type -> Type -> Type Source #

ExtTyped ExtType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Typed Type Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

typeOf :: Type -> Type Source #

IsBodyType ExtType Source # 
Instance details

Defined in Futhark.IR.RetType

IsBodyType BodyReturns Source # 
Instance details

Defined in Futhark.IR.Mem

HasLetDecMem LetDecMem Source # 
Instance details

Defined in Futhark.IR.Mem

FixExt ret => ExtTyped (MemInfo ExtSize NoUniqueness ret) Source # 
Instance details

Defined in Futhark.IR.Mem

Typed (MemInfo SubExp NoUniqueness ret) Source # 
Instance details

Defined in Futhark.IR.Mem

type SpaceId = String Source #

A string representing a specific non-default memory space.

data Space Source #

The memory space of a block. If DefaultSpace, this is the "default" space, whatever that is. The exact meaning of the SpaceId depends on the backend used. In GPU kernels, for example, this is used to distinguish between constant, global and shared memory spaces. In GPU-enabled host code, it is used to distinguish between host memory (DefaultSpace) and GPU space.

Constructors

DefaultSpace 
Space SpaceId 
ScalarSpace [SubExp] PrimType

A special kind of memory that is a statically sized array of some primitive type. Used for private memory on GPUs.

Instances

Instances details
Eq Space Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

(==) :: Space -> Space -> Bool #

(/=) :: Space -> Space -> Bool #

Ord Space Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

compare :: Space -> Space -> Ordering #

(<) :: Space -> Space -> Bool #

(<=) :: Space -> Space -> Bool #

(>) :: Space -> Space -> Bool #

(>=) :: Space -> Space -> Bool #

max :: Space -> Space -> Space #

min :: Space -> Space -> Space #

Show Space Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

showsPrec :: Int -> Space -> ShowS #

show :: Space -> String #

showList :: [Space] -> ShowS #

Pretty Space Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

ppr :: Space -> Doc #

pprPrec :: Int -> Space -> Doc #

pprList :: [Space] -> Doc #

FreeIn Space Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: Space -> FV Source #

Simplifiable Space Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

class (Monoid a, Eq a, Ord a) => ArrayShape a where Source #

A class encompassing types containing array shape information.

Methods

shapeRank :: a -> Int Source #

Return the rank of an array with the given size.

stripDims :: Int -> a -> a Source #

stripDims n shape strips the outer n dimensions from shape.

subShapeOf :: a -> a -> Bool Source #

Check whether one shape if a subset of another shape.

newtype Rank Source #

The size of an array type as merely the number of dimensions, with no further information.

Constructors

Rank Int 

Instances

Instances details
Eq Rank Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

(==) :: Rank -> Rank -> Bool #

(/=) :: Rank -> Rank -> Bool #

Ord Rank Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

compare :: Rank -> Rank -> Ordering #

(<) :: Rank -> Rank -> Bool #

(<=) :: Rank -> Rank -> Bool #

(>) :: Rank -> Rank -> Bool #

(>=) :: Rank -> Rank -> Bool #

max :: Rank -> Rank -> Rank #

min :: Rank -> Rank -> Rank #

Show Rank Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

showsPrec :: Int -> Rank -> ShowS #

show :: Rank -> String #

showList :: [Rank] -> ShowS #

Semigroup Rank Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

(<>) :: Rank -> Rank -> Rank #

sconcat :: NonEmpty Rank -> Rank #

stimes :: Integral b => b -> Rank -> Rank #

Monoid Rank Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

mempty :: Rank #

mappend :: Rank -> Rank -> Rank #

mconcat :: [Rank] -> Rank #

ArrayShape Rank Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Substitute Rank Source # 
Instance details

Defined in Futhark.Transform.Substitute

Rename Rank Source # 
Instance details

Defined in Futhark.Transform.Rename

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

Defined in Futhark.IR.Pretty

Methods

ppr :: TypeBase Rank u -> Doc #

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

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

type ExtShape = ShapeBase ExtSize Source #

Like Shape but some of its elements may be bound in a local environment instead. These are denoted with integral indices.

type ExtSize = Ext SubExp Source #

The size of this dimension.

data Ext a Source #

Something that may be existential.

Constructors

Ext Int 
Free a 

Instances

Instances details
Functor Ext Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fmap :: (a -> b) -> Ext a -> Ext b #

(<$) :: a -> Ext b -> Ext a #

Foldable Ext Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fold :: Monoid m => Ext m -> m #

foldMap :: Monoid m => (a -> m) -> Ext a -> m #

foldMap' :: Monoid m => (a -> m) -> Ext a -> m #

foldr :: (a -> b -> b) -> b -> Ext a -> b #

foldr' :: (a -> b -> b) -> b -> Ext a -> b #

foldl :: (b -> a -> b) -> b -> Ext a -> b #

foldl' :: (b -> a -> b) -> b -> Ext a -> b #

foldr1 :: (a -> a -> a) -> Ext a -> a #

foldl1 :: (a -> a -> a) -> Ext a -> a #

toList :: Ext a -> [a] #

null :: Ext a -> Bool #

length :: Ext a -> Int #

elem :: Eq a => a -> Ext a -> Bool #

maximum :: Ord a => Ext a -> a #

minimum :: Ord a => Ext a -> a #

sum :: Num a => Ext a -> a #

product :: Num a => Ext a -> a #

Traversable Ext Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

traverse :: Applicative f => (a -> f b) -> Ext a -> f (Ext b) #

sequenceA :: Applicative f => Ext (f a) -> f (Ext a) #

mapM :: Monad m => (a -> m b) -> Ext a -> m (Ext b) #

sequence :: Monad m => Ext (m a) -> m (Ext a) #

Pretty ExtShape Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

ppr :: ExtShape -> Doc #

pprPrec :: Int -> ExtShape -> Doc #

pprList :: [ExtShape] -> Doc #

FixExt ExtSize Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

fixExt :: Int -> SubExp -> ExtSize -> ExtSize Source #

DeclExtTyped DeclExtType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

ExtTyped ExtType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

IsRetType DeclExtType Source # 
Instance details

Defined in Futhark.IR.RetType

IsRetType FunReturns Source # 
Instance details

Defined in Futhark.IR.Mem

IsBodyType ExtType Source # 
Instance details

Defined in Futhark.IR.RetType

IsBodyType BodyReturns Source # 
Instance details

Defined in Futhark.IR.Mem

Rename ExtSize Source # 
Instance details

Defined in Futhark.Transform.Rename

Simplifiable ExtSize Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

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

Defined in Futhark.IR.Syntax.Core

Methods

(==) :: Ext a -> Ext a -> Bool #

(/=) :: Ext a -> Ext a -> Bool #

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

Defined in Futhark.IR.Syntax.Core

Methods

compare :: Ext a -> Ext a -> Ordering #

(<) :: Ext a -> Ext a -> Bool #

(<=) :: Ext a -> Ext a -> Bool #

(>) :: Ext a -> Ext a -> Bool #

(>=) :: Ext a -> Ext a -> Bool #

max :: Ext a -> Ext a -> Ext a #

min :: Ext a -> Ext a -> Ext a #

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

Defined in Futhark.IR.Syntax.Core

Methods

showsPrec :: Int -> Ext a -> ShowS #

show :: Ext a -> String #

showList :: [Ext a] -> ShowS #

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

Defined in Futhark.IR.Pretty

Methods

ppr :: Ext a -> Doc #

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

pprList :: [Ext a] -> Doc #

ArrayShape (ShapeBase ExtSize) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

FreeIn d => FreeIn (Ext d) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: Ext d -> FV Source #

Substitute d => Substitute (Ext d) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Simplifiable [FunReturns] Source # 
Instance details

Defined in Futhark.IR.Mem

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

Defined in Futhark.IR.Pretty

FixExt ret => FixExt (MemInfo ExtSize u ret) Source # 
Instance details

Defined in Futhark.IR.Mem

Methods

fixExt :: Int -> SubExp -> MemInfo ExtSize u ret -> MemInfo ExtSize u ret Source #

FixExt ret => DeclExtTyped (MemInfo ExtSize Uniqueness ret) Source # 
Instance details

Defined in Futhark.IR.Mem

FixExt ret => ExtTyped (MemInfo ExtSize NoUniqueness ret) Source # 
Instance details

Defined in Futhark.IR.Mem

type Shape = ShapeBase SubExp Source #

The size of an array as a list of subexpressions. If a variable, that variable must be in scope where this array is used.

newtype ShapeBase d Source #

The size of an array type as a list of its dimension sizes, with the type of sizes being parametric.

Constructors

Shape 

Fields

Instances

Instances details
Functor ShapeBase Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fmap :: (a -> b) -> ShapeBase a -> ShapeBase b #

(<$) :: a -> ShapeBase b -> ShapeBase a #

Foldable ShapeBase Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fold :: Monoid m => ShapeBase m -> m #

foldMap :: Monoid m => (a -> m) -> ShapeBase a -> m #

foldMap' :: Monoid m => (a -> m) -> ShapeBase a -> m #

foldr :: (a -> b -> b) -> b -> ShapeBase a -> b #

foldr' :: (a -> b -> b) -> b -> ShapeBase a -> b #

foldl :: (b -> a -> b) -> b -> ShapeBase a -> b #

foldl' :: (b -> a -> b) -> b -> ShapeBase a -> b #

foldr1 :: (a -> a -> a) -> ShapeBase a -> a #

foldl1 :: (a -> a -> a) -> ShapeBase a -> a #

toList :: ShapeBase a -> [a] #

null :: ShapeBase a -> Bool #

length :: ShapeBase a -> Int #

elem :: Eq a => a -> ShapeBase a -> Bool #

maximum :: Ord a => ShapeBase a -> a #

minimum :: Ord a => ShapeBase a -> a #

sum :: Num a => ShapeBase a -> a #

product :: Num a => ShapeBase a -> a #

Traversable ShapeBase Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

traverse :: Applicative f => (a -> f b) -> ShapeBase a -> f (ShapeBase b) #

sequenceA :: Applicative f => ShapeBase (f a) -> f (ShapeBase a) #

mapM :: Monad m => (a -> m b) -> ShapeBase a -> m (ShapeBase b) #

sequence :: Monad m => ShapeBase (m a) -> m (ShapeBase a) #

Pretty ExtShape Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

ppr :: ExtShape -> Doc #

pprPrec :: Int -> ExtShape -> Doc #

pprList :: [ExtShape] -> Doc #

Pretty Shape Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

ppr :: Shape -> Doc #

pprPrec :: Int -> Shape -> Doc #

pprList :: [Shape] -> Doc #

SetType Type Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

setType :: Type -> Type -> Type Source #

DeclExtTyped DeclExtType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

ExtTyped ExtType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

DeclTyped DeclType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Typed DeclType Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

typeOf :: DeclType -> Type Source #

Typed Type Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

typeOf :: Type -> Type Source #

IsRetType DeclExtType Source # 
Instance details

Defined in Futhark.IR.RetType

IsBodyType ExtType Source # 
Instance details

Defined in Futhark.IR.RetType

Eq d => Eq (ShapeBase d) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

(==) :: ShapeBase d -> ShapeBase d -> Bool #

(/=) :: ShapeBase d -> ShapeBase d -> Bool #

Ord d => Ord (ShapeBase d) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Show d => Show (ShapeBase d) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Semigroup (ShapeBase d) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

(<>) :: ShapeBase d -> ShapeBase d -> ShapeBase d #

sconcat :: NonEmpty (ShapeBase d) -> ShapeBase d #

stimes :: Integral b => b -> ShapeBase d -> ShapeBase d #

Monoid (ShapeBase d) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

ArrayShape (ShapeBase SubExp) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

ArrayShape (ShapeBase ExtSize) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

FixExt d => FixExt (ShapeBase d) Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

fixExt :: Int -> SubExp -> ShapeBase d -> ShapeBase d Source #

FreeIn d => FreeIn (ShapeBase d) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: ShapeBase d -> FV Source #

Substitute d => Substitute (ShapeBase d) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Rename d => Rename (ShapeBase d) Source # 
Instance details

Defined in Futhark.Transform.Rename

Simplifiable d => Simplifiable (ShapeBase d) Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

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

Defined in Futhark.IR.Pretty

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

Defined in Futhark.IR.Pretty

Methods

ppr :: TypeBase Shape u -> Doc #

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

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

data Commutativity Source #

Whether some operator is commutative or not. The Monoid instance returns the least commutative of its arguments.

Instances

Instances details
Eq Commutativity Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Ord Commutativity Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Show Commutativity Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Semigroup Commutativity Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Monoid Commutativity Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Pretty Commutativity Source # 
Instance details

Defined in Futhark.IR.Pretty

dimFix :: DimIndex d -> Maybe d Source #

If the argument is a DimFix, return its component.

sliceIndices :: Slice d -> Maybe [d] Source #

If the slice is all DimFixs, return the components.

sliceDims :: Slice d -> [d] Source #

The dimensions of the array produced by this slice.

unitSlice :: Num d => d -> d -> DimIndex d Source #

A slice with a stride of one.

fixSlice :: Num d => Slice d -> [d] -> [d] Source #

Fix the DimSlices of a slice. The number of indexes must equal the length of sliceDims for the slice.

sliceSlice :: Num d => Slice d -> Slice d -> Slice d Source #

Further slice the DimSlices of a slice. The number of slices must equal the length of sliceDims for the slice.

errorMsgArgTypes :: ErrorMsg a -> [PrimType] Source #

How many non-constant parts does the error message have, and what is their type?

class (Show rt, Eq rt, Ord rt, DeclExtTyped rt) => IsRetType rt where Source #

A type representing the return type of a function. In practice, a list of these will be used. It should contain at least the information contained in an ExtType, but may have more, notably an existential context.

Methods

primRetType :: PrimType -> rt Source #

Contruct a return type from a primitive type.

applyRetType :: Typed dec => [rt] -> [Param dec] -> [(SubExp, Type)] -> Maybe [rt] Source #

Given a function return type, the parameters of the function, and the arguments for a concrete call, return the instantiated return type for the concrete call, if valid.

Instances

Instances details
IsRetType DeclExtType Source # 
Instance details

Defined in Futhark.IR.RetType

IsRetType FunReturns Source # 
Instance details

Defined in Futhark.IR.Mem

class (Show rt, Eq rt, Ord rt, ExtTyped rt) => IsBodyType rt where Source #

A type representing the return type of a body. It should contain at least the information contained in a list of ExtTypes, but may have more, notably an existential context.

Methods

primBodyType :: PrimType -> rt Source #

Construct a body type from a primitive type.

Instances

Instances details
IsBodyType ExtType Source # 
Instance details

Defined in Futhark.IR.RetType

IsBodyType BodyReturns Source # 
Instance details

Defined in Futhark.IR.Mem

expectedTypes :: Typed t => [VName] -> [t] -> [SubExp] -> [Type] Source #

Given shape parameter names and types, produce the types of arguments accepted.

class (Show (LetDec l), Show (ExpDec l), Show (BodyDec l), Show (FParamInfo l), Show (LParamInfo l), Show (RetType l), Show (BranchType l), Show (Op l), Eq (LetDec l), Eq (ExpDec l), Eq (BodyDec l), Eq (FParamInfo l), Eq (LParamInfo l), Eq (RetType l), Eq (BranchType l), Eq (Op l), Ord (LetDec l), Ord (ExpDec l), Ord (BodyDec l), Ord (FParamInfo l), Ord (LParamInfo l), Ord (RetType l), Ord (BranchType l), Ord (Op l), IsRetType (RetType l), IsBodyType (BranchType l), Typed (FParamInfo l), Typed (LParamInfo l), Typed (LetDec l), DeclTyped (FParamInfo l)) => RepTypes l Source #

A collection of type families giving various common types for a representation, along with constraints specifying that the types they map to should satisfy some minimal requirements.

Associated Types

type LetDec l :: Type Source #

Decoration for every let-pattern element.

type LetDec l = Type

type ExpDec l :: Type Source #

Decoration for every expression.

type ExpDec l = ()

type BodyDec l :: Type Source #

Decoration for every body.

type BodyDec l = ()

type FParamInfo l :: Type Source #

Decoration for every (non-lambda) function parameter.

type LParamInfo l :: Type Source #

Decoration for every lambda function parameter.

type LParamInfo l = Type

type BranchType l :: Type Source #

The return type decoration of branches.

type Op l :: Type Source #

Extensible operation.

type Op l = ()

Instances

Instances details
RepTypes Seq Source # 
Instance details

Defined in Futhark.IR.Seq

RepTypes SOACS Source # 
Instance details

Defined in Futhark.IR.SOACS

RepTypes SeqMem Source # 
Instance details

Defined in Futhark.IR.SeqMem

RepTypes MCMem Source # 
Instance details

Defined in Futhark.IR.MCMem

RepTypes MC Source # 
Instance details

Defined in Futhark.IR.MC

RepTypes GPU Source # 
Instance details

Defined in Futhark.IR.GPU

RepTypes GPUMem Source # 
Instance details

Defined in Futhark.IR.GPUMem

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

Defined in Futhark.IR.Aliases

Associated Types

type LetDec (Aliases rep) Source #

type ExpDec (Aliases rep) Source #

type BodyDec (Aliases rep) Source #

type FParamInfo (Aliases rep) Source #

type LParamInfo (Aliases rep) Source #

type RetType (Aliases rep) Source #

type BranchType (Aliases rep) Source #

type Op (Aliases rep) Source #

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

Defined in Futhark.Optimise.Simplify.Rep

Associated Types

type LetDec (Wise rep) Source #

type ExpDec (Wise rep) Source #

type BodyDec (Wise rep) Source #

type FParamInfo (Wise rep) Source #

type LParamInfo (Wise rep) Source #

type RetType (Wise rep) Source #

type BranchType (Wise rep) Source #

type Op (Wise rep) Source #

data Prog rep Source #

An entire Futhark program.

Constructors

Prog 

Fields

  • progConsts :: Stms rep

    Top-level constants that are computed at program startup, and which are in scope inside all functions.

  • progFuns :: [FunDef rep]

    The functions comprising the program. All funtions are also available in scope in the definitions of the constants, so be careful not to introduce circular dependencies (not currently checked).

Instances

Instances details
RepTypes rep => Eq (Prog rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(==) :: Prog rep -> Prog rep -> Bool #

(/=) :: Prog rep -> Prog rep -> Bool #

RepTypes rep => Ord (Prog rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

compare :: Prog rep -> Prog rep -> Ordering #

(<) :: Prog rep -> Prog rep -> Bool #

(<=) :: Prog rep -> Prog rep -> Bool #

(>) :: Prog rep -> Prog rep -> Bool #

(>=) :: Prog rep -> Prog rep -> Bool #

max :: Prog rep -> Prog rep -> Prog rep #

min :: Prog rep -> Prog rep -> Prog rep #

RepTypes rep => Show (Prog rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

showsPrec :: Int -> Prog rep -> ShowS #

show :: Prog rep -> String #

showList :: [Prog rep] -> ShowS #

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

Defined in Futhark.IR.Pretty

Methods

ppr :: Prog rep -> Doc #

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

pprList :: [Prog rep] -> Doc #

type EntryPoint = (Name, [EntryParam], [EntryPointType]) Source #

Information about the inputs and outputs (return value) of an entry point.

data EntryParam Source #

An entry point parameter, comprising its name and original type.

data EntryPointType Source #

Every entry point argument and return value has an annotation indicating how it maps to the original source program type.

Constructors

TypeUnsigned Uniqueness

Is an unsigned integer or array of unsigned integers.

TypeOpaque Uniqueness String Int

A black box type comprising this many core values. The string is a human-readable description with no other semantics.

TypeDirect Uniqueness

Maps directly.

data FunDef rep Source #

Function Declarations

Constructors

FunDef 

Fields

Instances

Instances details
Scoped rep (FunDef rep) Source # 
Instance details

Defined in Futhark.IR.Prop.Scope

Methods

scopeOf :: FunDef rep -> Scope rep Source #

RepTypes rep => Eq (FunDef rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(==) :: FunDef rep -> FunDef rep -> Bool #

(/=) :: FunDef rep -> FunDef rep -> Bool #

RepTypes rep => Ord (FunDef rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

compare :: FunDef rep -> FunDef rep -> Ordering #

(<) :: FunDef rep -> FunDef rep -> Bool #

(<=) :: FunDef rep -> FunDef rep -> Bool #

(>) :: FunDef rep -> FunDef rep -> Bool #

(>=) :: FunDef rep -> FunDef rep -> Bool #

max :: FunDef rep -> FunDef rep -> FunDef rep #

min :: FunDef rep -> FunDef rep -> FunDef rep #

RepTypes rep => Show (FunDef rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

showsPrec :: Int -> FunDef rep -> ShowS #

show :: FunDef rep -> String #

showList :: [FunDef rep] -> ShowS #

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

Defined in Futhark.IR.Pretty

Methods

ppr :: FunDef rep -> Doc #

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

pprList :: [FunDef rep] -> Doc #

(FreeDec (ExpDec rep), FreeDec (BodyDec rep), FreeIn (FParamInfo rep), FreeIn (LParamInfo rep), FreeIn (LetDec rep), FreeIn (RetType rep), FreeIn (BranchType rep), FreeIn (Op rep)) => FreeIn (FunDef rep) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: FunDef rep -> FV Source #

Renameable rep => Rename (FunDef rep) Source # 
Instance details

Defined in Futhark.Transform.Rename

Methods

rename :: FunDef rep -> RenameM (FunDef rep) Source #

data LambdaT rep Source #

Anonymous function for use in a SOAC.

Instances

Instances details
Scoped rep (Lambda rep) Source # 
Instance details

Defined in Futhark.IR.Prop.Scope

Methods

scopeOf :: Lambda rep -> Scope rep Source #

RepTypes rep => Eq (LambdaT rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(==) :: LambdaT rep -> LambdaT rep -> Bool #

(/=) :: LambdaT rep -> LambdaT rep -> Bool #

RepTypes rep => Ord (LambdaT rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

compare :: LambdaT rep -> LambdaT rep -> Ordering #

(<) :: LambdaT rep -> LambdaT rep -> Bool #

(<=) :: LambdaT rep -> LambdaT rep -> Bool #

(>) :: LambdaT rep -> LambdaT rep -> Bool #

(>=) :: LambdaT rep -> LambdaT rep -> Bool #

max :: LambdaT rep -> LambdaT rep -> LambdaT rep #

min :: LambdaT rep -> LambdaT rep -> LambdaT rep #

RepTypes rep => Show (LambdaT rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

showsPrec :: Int -> LambdaT rep -> ShowS #

show :: LambdaT rep -> String #

showList :: [LambdaT rep] -> ShowS #

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

Defined in Futhark.IR.Pretty

Methods

ppr :: Lambda rep -> Doc #

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

pprList :: [Lambda rep] -> Doc #

(FreeDec (ExpDec rep), FreeDec (BodyDec rep), FreeIn (FParamInfo rep), FreeIn (LParamInfo rep), FreeIn (LetDec rep), FreeIn (RetType rep), FreeIn (BranchType rep), FreeIn (Op rep)) => FreeIn (Lambda rep) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: Lambda rep -> FV Source #

Substitutable rep => Substitute (Lambda rep) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Renameable rep => Rename (Lambda rep) Source # 
Instance details

Defined in Futhark.Transform.Rename

Methods

rename :: Lambda rep -> RenameM (Lambda rep) Source #

data IfSort Source #

What kind of branch is this? This has no semantic meaning, but provides hints to simplifications.

Constructors

IfNormal

An ordinary branch.

IfFallback

A branch where the "true" case is what we are actually interested in, and the "false" case is only present as a fallback for when the true case cannot be safely evaluated. The compiler is permitted to optimise away the branch if the true case contains only safe statements.

IfEquiv

Both of these branches are semantically equivalent, and it is fine to eliminate one if it turns out to have problems (e.g. contain things we cannot generate code for).

Instances

Instances details
Eq IfSort Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(==) :: IfSort -> IfSort -> Bool #

(/=) :: IfSort -> IfSort -> Bool #

Ord IfSort Source # 
Instance details

Defined in Futhark.IR.Syntax

Show IfSort Source # 
Instance details

Defined in Futhark.IR.Syntax

data IfDec rt Source #

Data associated with a branch.

Constructors

IfDec 

Fields

Instances

Instances details
Eq rt => Eq (IfDec rt) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(==) :: IfDec rt -> IfDec rt -> Bool #

(/=) :: IfDec rt -> IfDec rt -> Bool #

Ord rt => Ord (IfDec rt) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

compare :: IfDec rt -> IfDec rt -> Ordering #

(<) :: IfDec rt -> IfDec rt -> Bool #

(<=) :: IfDec rt -> IfDec rt -> Bool #

(>) :: IfDec rt -> IfDec rt -> Bool #

(>=) :: IfDec rt -> IfDec rt -> Bool #

max :: IfDec rt -> IfDec rt -> IfDec rt #

min :: IfDec rt -> IfDec rt -> IfDec rt #

Show rt => Show (IfDec rt) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

showsPrec :: Int -> IfDec rt -> ShowS #

show :: IfDec rt -> String #

showList :: [IfDec rt] -> ShowS #

FreeIn a => FreeIn (IfDec a) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: IfDec a -> FV Source #

data LoopForm rep Source #

For-loop or while-loop?

Instances

Instances details
Scoped rep (LoopForm rep) Source # 
Instance details

Defined in Futhark.IR.Prop.Scope

Methods

scopeOf :: LoopForm rep -> Scope rep Source #

RepTypes rep => Eq (LoopForm rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(==) :: LoopForm rep -> LoopForm rep -> Bool #

(/=) :: LoopForm rep -> LoopForm rep -> Bool #

RepTypes rep => Ord (LoopForm rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

compare :: LoopForm rep -> LoopForm rep -> Ordering #

(<) :: LoopForm rep -> LoopForm rep -> Bool #

(<=) :: LoopForm rep -> LoopForm rep -> Bool #

(>) :: LoopForm rep -> LoopForm rep -> Bool #

(>=) :: LoopForm rep -> LoopForm rep -> Bool #

max :: LoopForm rep -> LoopForm rep -> LoopForm rep #

min :: LoopForm rep -> LoopForm rep -> LoopForm rep #

RepTypes rep => Show (LoopForm rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

showsPrec :: Int -> LoopForm rep -> ShowS #

show :: LoopForm rep -> String #

showList :: [LoopForm rep] -> ShowS #

FreeIn (LParamInfo rep) => FreeIn (LoopForm rep) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: LoopForm rep -> FV Source #

data ExpT rep Source #

The root Futhark expression type. The Op constructor contains a rep-specific operation. Do-loops, branches and function calls are special. Everything else is a simple BasicOp.

Constructors

BasicOp BasicOp

A simple (non-recursive) operation.

Apply Name [(SubExp, Diet)] [RetType rep] (Safety, SrcLoc, [SrcLoc]) 
If SubExp (BodyT rep) (BodyT rep) (IfDec (BranchType rep)) 
DoLoop [(FParam rep, SubExp)] (LoopForm rep) (BodyT rep)

loop {a} = {v} (for i < n|while b) do b.

WithAcc [(Shape, [VName], Maybe (Lambda rep, [SubExp]))] (Lambda rep)

Create accumulators backed by the given arrays (which are consumed) and pass them to the lambda, which must return the updated accumulators and possibly some extra values. The accumulators are turned back into arrays. The Shape is the write index space. The corresponding arrays must all have this shape outermost. This construct is not part of BasicOp because we need the rep parameter.

Op (Op rep) 

Instances

Instances details
RepTypes rep => Eq (ExpT rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(==) :: ExpT rep -> ExpT rep -> Bool #

(/=) :: ExpT rep -> ExpT rep -> Bool #

RepTypes rep => Ord (ExpT rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

compare :: ExpT rep -> ExpT rep -> Ordering #

(<) :: ExpT rep -> ExpT rep -> Bool #

(<=) :: ExpT rep -> ExpT rep -> Bool #

(>) :: ExpT rep -> ExpT rep -> Bool #

(>=) :: ExpT rep -> ExpT rep -> Bool #

max :: ExpT rep -> ExpT rep -> ExpT rep #

min :: ExpT rep -> ExpT rep -> ExpT rep #

RepTypes rep => Show (ExpT rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

showsPrec :: Int -> ExpT rep -> ShowS #

show :: ExpT rep -> String #

showList :: [ExpT rep] -> ShowS #

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

Defined in Futhark.IR.Pretty

Methods

ppr :: Exp rep -> Doc #

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

pprList :: [Exp rep] -> Doc #

(FreeDec (ExpDec rep), FreeDec (BodyDec rep), FreeIn (FParamInfo rep), FreeIn (LParamInfo rep), FreeIn (LetDec rep), FreeIn (RetType rep), FreeIn (BranchType rep), FreeIn (Op rep)) => FreeIn (Exp rep) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: Exp rep -> FV Source #

Substitutable rep => Substitute (Exp rep) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> Exp rep -> Exp rep Source #

Renameable rep => Rename (Exp rep) Source # 
Instance details

Defined in Futhark.Transform.Rename

Methods

rename :: Exp rep -> RenameM (Exp rep) Source #

data BasicOp Source #

A primitive operation that returns something of known size and does not itself contain any bindings.

Constructors

SubExp SubExp

A variable or constant.

Opaque OpaqueOp SubExp

Semantically and operationally just identity, but is invisible/impenetrable to optimisations (hopefully). This partially a hack to avoid optimisation (so, to work around compiler limitations), but is also used to implement tracing and other operations that are semantically invisible, but have some sort of effect (brrr).

ArrayLit [SubExp] Type

Array literals, e.g., [ [1+x, 3], [2, 1+4] ]. Second arg is the element type of the rows of the array.

UnOp UnOp SubExp

Unary operation.

BinOp BinOp SubExp SubExp

Binary operation.

CmpOp CmpOp SubExp SubExp

Comparison - result type is always boolean.

ConvOp ConvOp SubExp

Conversion "casting".

Assert SubExp (ErrorMsg SubExp) (SrcLoc, [SrcLoc])

Turn a boolean into a certificate, halting the program with the given error message if the boolean is false.

Index VName (Slice SubExp)

The certificates for bounds-checking are part of the Stm.

Update Safety VName (Slice SubExp) SubExp

An in-place update of the given array at the given position. Consumes the array. If Safe, perform a run-time bounds check and ignore the write if out of bounds (like Scatter).

FlatIndex VName (FlatSlice SubExp) 
FlatUpdate VName (FlatSlice SubExp) VName 
Concat Int VName [VName] SubExp

concat0([1],[2, 3, 4]) = [1, 2, 3, 4]@.

Copy VName

Copy the given array. The result will not alias anything.

Manifest [Int] VName

Manifest an array with dimensions represented in the given order. The result will not alias anything.

Iota SubExp SubExp SubExp IntType

iota(n, x, s) = [x,x+s,..,x+(n-1)*s].

The IntType indicates the type of the array returned and the offset/stride arguments, but not the length argument.

Replicate Shape SubExp
replicate([3][2],1) = [[1,1], [1,1], [1,1]]
Scratch PrimType [SubExp]

Create array of given type and shape, with undefined elements.

Reshape (ShapeChange SubExp) VName

1st arg is the new shape, 2nd arg is the input array *)

Rearrange [Int] VName

Permute the dimensions of the input array. The list of integers is a list of dimensions (0-indexed), which must be a permutation of [0,n-1], where n is the number of dimensions in the input array.

Rotate [SubExp] VName

Rotate the dimensions of the input array. The list of subexpressions specify how much each dimension is rotated. The length of this list must be equal to the rank of the array.

UpdateAcc VName [SubExp] [SubExp]

Update an accumulator at the given index with the given value. Consumes the accumulator and produces a new one.

Instances

Instances details
Eq BasicOp Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(==) :: BasicOp -> BasicOp -> Bool #

(/=) :: BasicOp -> BasicOp -> Bool #

Ord BasicOp Source # 
Instance details

Defined in Futhark.IR.Syntax

Show BasicOp Source # 
Instance details

Defined in Futhark.IR.Syntax

Pretty BasicOp Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

ppr :: BasicOp -> Doc #

pprPrec :: Int -> BasicOp -> Doc #

pprList :: [BasicOp] -> Doc #

data OpaqueOp Source #

Apart from being Opaque, what else is going on here?

Constructors

OpaqueNil

No special operation.

OpaqueTrace String

Print the argument, prefixed by this string.

Instances

Instances details
Eq OpaqueOp Source # 
Instance details

Defined in Futhark.IR.Syntax

Ord OpaqueOp Source # 
Instance details

Defined in Futhark.IR.Syntax

Show OpaqueOp Source # 
Instance details

Defined in Futhark.IR.Syntax

type ShapeChange d = [DimChange d] Source #

A list of DimChanges, indicating the new dimensions of an array.

data DimChange d Source #

The new dimension in a Reshape-like operation. This allows us to disambiguate "real" reshapes, that change the actual shape of the array, from type coercions that are just present to make the types work out. The two constructors are considered equal for purposes of Eq.

Constructors

DimCoercion d

The new dimension is guaranteed to be numerically equal to the old one.

DimNew d

The new dimension is not necessarily numerically equal to the old one.

Instances

Instances details
Functor DimChange Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

fmap :: (a -> b) -> DimChange a -> DimChange b #

(<$) :: a -> DimChange b -> DimChange a #

Foldable DimChange Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

fold :: Monoid m => DimChange m -> m #

foldMap :: Monoid m => (a -> m) -> DimChange a -> m #

foldMap' :: Monoid m => (a -> m) -> DimChange a -> m #

foldr :: (a -> b -> b) -> b -> DimChange a -> b #

foldr' :: (a -> b -> b) -> b -> DimChange a -> b #

foldl :: (b -> a -> b) -> b -> DimChange a -> b #

foldl' :: (b -> a -> b) -> b -> DimChange a -> b #

foldr1 :: (a -> a -> a) -> DimChange a -> a #

foldl1 :: (a -> a -> a) -> DimChange a -> a #

toList :: DimChange a -> [a] #

null :: DimChange a -> Bool #

length :: DimChange a -> Int #

elem :: Eq a => a -> DimChange a -> Bool #

maximum :: Ord a => DimChange a -> a #

minimum :: Ord a => DimChange a -> a #

sum :: Num a => DimChange a -> a #

product :: Num a => DimChange a -> a #

Traversable DimChange Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

traverse :: Applicative f => (a -> f b) -> DimChange a -> f (DimChange b) #

sequenceA :: Applicative f => DimChange (f a) -> f (DimChange a) #

mapM :: Monad m => (a -> m b) -> DimChange a -> m (DimChange b) #

sequence :: Monad m => DimChange (m a) -> m (DimChange a) #

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

Defined in Futhark.IR.Syntax

Methods

(==) :: DimChange d -> DimChange d -> Bool #

(/=) :: DimChange d -> DimChange d -> Bool #

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

Defined in Futhark.IR.Syntax

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

Defined in Futhark.IR.Syntax

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

Defined in Futhark.IR.Pretty

Methods

ppr :: DimChange d -> Doc #

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

pprList :: [DimChange d] -> Doc #

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

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: DimChange d -> FV Source #

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

Defined in Futhark.Transform.Substitute

data BodyT rep Source #

A body consists of a number of bindings, terminating in a result (essentially a tuple literal).

Instances

Instances details
RepTypes rep => Eq (BodyT rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(==) :: BodyT rep -> BodyT rep -> Bool #

(/=) :: BodyT rep -> BodyT rep -> Bool #

RepTypes rep => Ord (BodyT rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

compare :: BodyT rep -> BodyT rep -> Ordering #

(<) :: BodyT rep -> BodyT rep -> Bool #

(<=) :: BodyT rep -> BodyT rep -> Bool #

(>) :: BodyT rep -> BodyT rep -> Bool #

(>=) :: BodyT rep -> BodyT rep -> Bool #

max :: BodyT rep -> BodyT rep -> BodyT rep #

min :: BodyT rep -> BodyT rep -> BodyT rep #

RepTypes rep => Show (BodyT rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

showsPrec :: Int -> BodyT rep -> ShowS #

show :: BodyT rep -> String #

showList :: [BodyT rep] -> ShowS #

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

Defined in Futhark.IR.Pretty

Methods

ppr :: Body rep -> Doc #

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

pprList :: [Body rep] -> Doc #

(FreeDec (ExpDec rep), FreeDec (BodyDec rep), FreeIn (FParamInfo rep), FreeIn (LParamInfo rep), FreeIn (LetDec rep), FreeIn (RetType rep), FreeIn (BranchType rep), FreeIn (Op rep)) => FreeIn (Body rep) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: Body rep -> FV Source #

Substitutable rep => Substitute (Body rep) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> Body rep -> Body rep Source #

Renameable rep => Rename (Body rep) Source # 
Instance details

Defined in Futhark.Transform.Rename

Methods

rename :: Body rep -> RenameM (Body rep) Source #

type Result = [SubExpRes] Source #

The result of a body is a sequence of subexpressions.

data SubExpRes Source #

A pairing of a subexpression and some certificates.

Constructors

SubExpRes 

Instances

Instances details
Eq SubExpRes Source # 
Instance details

Defined in Futhark.IR.Syntax

Ord SubExpRes Source # 
Instance details

Defined in Futhark.IR.Syntax

Show SubExpRes Source # 
Instance details

Defined in Futhark.IR.Syntax

Pretty SubExpRes Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

ppr :: SubExpRes -> Doc #

pprPrec :: Int -> SubExpRes -> Doc #

pprList :: [SubExpRes] -> Doc #

FreeIn SubExpRes Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: SubExpRes -> FV Source #

Substitute SubExpRes Source # 
Instance details

Defined in Futhark.Transform.Substitute

Rename SubExpRes Source # 
Instance details

Defined in Futhark.Transform.Rename

Simplifiable SubExpRes Source # 
Instance details

Defined in Futhark.Optimise.Simplify.Engine

type Stms rep = Seq (Stm rep) Source #

A sequence of statements.

pattern Let :: Pat rep -> StmAux (ExpDec rep) -> Exp rep -> Stm rep Source #

stmExp :: Stm rep -> Exp rep Source #

Expression.

stmPat :: Stm rep -> Pat rep Source #

Pat.

stmAux :: Stm rep -> StmAux (ExpDec rep) Source #

Auxiliary information statement.

data StmAux dec Source #

Auxilliary Information associated with a statement.

Constructors

StmAux 

Fields

Instances

Instances details
Eq dec => Eq (StmAux dec) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(==) :: StmAux dec -> StmAux dec -> Bool #

(/=) :: StmAux dec -> StmAux dec -> Bool #

Ord dec => Ord (StmAux dec) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

compare :: StmAux dec -> StmAux dec -> Ordering #

(<) :: StmAux dec -> StmAux dec -> Bool #

(<=) :: StmAux dec -> StmAux dec -> Bool #

(>) :: StmAux dec -> StmAux dec -> Bool #

(>=) :: StmAux dec -> StmAux dec -> Bool #

max :: StmAux dec -> StmAux dec -> StmAux dec #

min :: StmAux dec -> StmAux dec -> StmAux dec #

Show dec => Show (StmAux dec) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

showsPrec :: Int -> StmAux dec -> ShowS #

show :: StmAux dec -> String #

showList :: [StmAux dec] -> ShowS #

Semigroup dec => Semigroup (StmAux dec) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(<>) :: StmAux dec -> StmAux dec -> StmAux dec #

sconcat :: NonEmpty (StmAux dec) -> StmAux dec #

stimes :: Integral b => b -> StmAux dec -> StmAux dec #

FreeIn dec => FreeIn (StmAux dec) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: StmAux dec -> FV Source #

Substitute dec => Substitute (StmAux dec) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Rename dec => Rename (StmAux dec) Source # 
Instance details

Defined in Futhark.Transform.Rename

Methods

rename :: StmAux dec -> RenameM (StmAux dec) Source #

data PatT dec Source #

A pattern is conceptually just a list of names and their types.

Instances

Instances details
Functor PatT Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

fmap :: (a -> b) -> PatT a -> PatT b #

(<$) :: a -> PatT b -> PatT a #

Foldable PatT Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

fold :: Monoid m => PatT m -> m #

foldMap :: Monoid m => (a -> m) -> PatT a -> m #

foldMap' :: Monoid m => (a -> m) -> PatT a -> m #

foldr :: (a -> b -> b) -> b -> PatT a -> b #

foldr' :: (a -> b -> b) -> b -> PatT a -> b #

foldl :: (b -> a -> b) -> b -> PatT a -> b #

foldl' :: (b -> a -> b) -> b -> PatT a -> b #

foldr1 :: (a -> a -> a) -> PatT a -> a #

foldl1 :: (a -> a -> a) -> PatT a -> a #

toList :: PatT a -> [a] #

null :: PatT a -> Bool #

length :: PatT a -> Int #

elem :: Eq a => a -> PatT a -> Bool #

maximum :: Ord a => PatT a -> a #

minimum :: Ord a => PatT a -> a #

sum :: Num a => PatT a -> a #

product :: Num a => PatT a -> a #

Traversable PatT Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

traverse :: Applicative f => (a -> f b) -> PatT a -> f (PatT b) #

sequenceA :: Applicative f => PatT (f a) -> f (PatT a) #

mapM :: Monad m => (a -> m b) -> PatT a -> m (PatT b) #

sequence :: Monad m => PatT (m a) -> m (PatT a) #

Eq dec => Eq (PatT dec) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(==) :: PatT dec -> PatT dec -> Bool #

(/=) :: PatT dec -> PatT dec -> Bool #

Ord dec => Ord (PatT dec) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

compare :: PatT dec -> PatT dec -> Ordering #

(<) :: PatT dec -> PatT dec -> Bool #

(<=) :: PatT dec -> PatT dec -> Bool #

(>) :: PatT dec -> PatT dec -> Bool #

(>=) :: PatT dec -> PatT dec -> Bool #

max :: PatT dec -> PatT dec -> PatT dec #

min :: PatT dec -> PatT dec -> PatT dec #

Show dec => Show (PatT dec) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

showsPrec :: Int -> PatT dec -> ShowS #

show :: PatT dec -> String #

showList :: [PatT dec] -> ShowS #

Semigroup (PatT dec) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(<>) :: PatT dec -> PatT dec -> PatT dec #

sconcat :: NonEmpty (PatT dec) -> PatT dec #

stimes :: Integral b => b -> PatT dec -> PatT dec #

Monoid (PatT dec) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

mempty :: PatT dec #

mappend :: PatT dec -> PatT dec -> PatT dec #

mconcat :: [PatT dec] -> PatT dec #

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

Defined in Futhark.IR.Pretty

Methods

ppr :: PatT dec -> Doc #

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

pprList :: [PatT dec] -> Doc #

FreeIn dec => FreeIn (PatT dec) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: PatT dec -> FV Source #

Substitute dec => Substitute (PatT dec) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> PatT dec -> PatT dec Source #

Rename dec => Rename (PatT dec) Source # 
Instance details

Defined in Futhark.Transform.Rename

Methods

rename :: PatT dec -> RenameM (PatT dec) Source #

newtype Attrs Source #

Every statement is associated with a set of attributes, which can have various effects throughout the compiler.

Constructors

Attrs 

Fields

Instances

Instances details
Eq Attrs Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(==) :: Attrs -> Attrs -> Bool #

(/=) :: Attrs -> Attrs -> Bool #

Ord Attrs Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

compare :: Attrs -> Attrs -> Ordering #

(<) :: Attrs -> Attrs -> Bool #

(<=) :: Attrs -> Attrs -> Bool #

(>) :: Attrs -> Attrs -> Bool #

(>=) :: Attrs -> Attrs -> Bool #

max :: Attrs -> Attrs -> Attrs #

min :: Attrs -> Attrs -> Attrs #

Show Attrs Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

showsPrec :: Int -> Attrs -> ShowS #

show :: Attrs -> String #

showList :: [Attrs] -> ShowS #

Semigroup Attrs Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(<>) :: Attrs -> Attrs -> Attrs #

sconcat :: NonEmpty Attrs -> Attrs #

stimes :: Integral b => b -> Attrs -> Attrs #

Monoid Attrs Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

mempty :: Attrs #

mappend :: Attrs -> Attrs -> Attrs #

mconcat :: [Attrs] -> Attrs #

Pretty Attrs Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

ppr :: Attrs -> Doc #

pprPrec :: Int -> Attrs -> Doc #

pprList :: [Attrs] -> Doc #

FreeIn Attrs Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: Attrs -> FV Source #

Substitute Attrs Source # 
Instance details

Defined in Futhark.Transform.Substitute

Rename Attrs Source # 
Instance details

Defined in Futhark.Transform.Rename

data Attr Source #

A single attribute.

Constructors

AttrAtom Name 
AttrComp Name [Attr] 

Instances

Instances details
Eq Attr Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(==) :: Attr -> Attr -> Bool #

(/=) :: Attr -> Attr -> Bool #

Ord Attr Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

compare :: Attr -> Attr -> Ordering #

(<) :: Attr -> Attr -> Bool #

(<=) :: Attr -> Attr -> Bool #

(>) :: Attr -> Attr -> Bool #

(>=) :: Attr -> Attr -> Bool #

max :: Attr -> Attr -> Attr #

min :: Attr -> Attr -> Attr #

Show Attr Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

showsPrec :: Int -> Attr -> ShowS #

show :: Attr -> String #

showList :: [Attr] -> ShowS #

IsString Attr Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

fromString :: String -> Attr #

Pretty Attr Source # 
Instance details

Defined in Futhark.IR.Pretty

Methods

ppr :: Attr -> Doc #

pprPrec :: Int -> Attr -> Doc #

pprList :: [Attr] -> Doc #

oneAttr :: Attr -> Attrs Source #

Construct Attrs from a single Attr.

inAttrs :: Attr -> Attrs -> Bool Source #

Is the given attribute to be found in the attribute set?

withoutAttrs :: Attrs -> Attrs -> Attrs Source #

x withoutAttrs y gives x except for any attributes also in y.

oneStm :: Stm rep -> Stms rep Source #

A single statement.

stmsFromList :: [Stm rep] -> Stms rep Source #

Convert a statement list to a statement sequence.

stmsToList :: Stms rep -> [Stm rep] Source #

Convert a statement sequence to a statement list.

stmsHead :: Stms rep -> Maybe (Stm rep, Stms rep) Source #

The first statement in the sequence, if any.

subExpRes :: SubExp -> SubExpRes Source #

Construct a SubExpRes with no certificates.

varRes :: VName -> SubExpRes Source #

Construct a SubExpRes from a variable name.

subExpsRes :: [SubExp] -> Result Source #

Construct a Result from subexpressions.

varsRes :: [VName] -> Result Source #

Construct a Result from variable names.

data LambdaT rep Source #

Anonymous function for use in a SOAC.

Constructors

Lambda [LParam rep] (BodyT rep) [Type] 

Instances

Instances details
Scoped rep (Lambda rep) Source # 
Instance details

Defined in Futhark.IR.Prop.Scope

Methods

scopeOf :: Lambda rep -> Scope rep Source #

RepTypes rep => Eq (LambdaT rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(==) :: LambdaT rep -> LambdaT rep -> Bool #

(/=) :: LambdaT rep -> LambdaT rep -> Bool #

RepTypes rep => Ord (LambdaT rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

compare :: LambdaT rep -> LambdaT rep -> Ordering #

(<) :: LambdaT rep -> LambdaT rep -> Bool #

(<=) :: LambdaT rep -> LambdaT rep -> Bool #

(>) :: LambdaT rep -> LambdaT rep -> Bool #

(>=) :: LambdaT rep -> LambdaT rep -> Bool #

max :: LambdaT rep -> LambdaT rep -> LambdaT rep #

min :: LambdaT rep -> LambdaT rep -> LambdaT rep #

RepTypes rep => Show (LambdaT rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

showsPrec :: Int -> LambdaT rep -> ShowS #

show :: LambdaT rep -> String #

showList :: [LambdaT rep] -> ShowS #

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

Defined in Futhark.IR.Pretty

Methods

ppr :: Lambda rep -> Doc #

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

pprList :: [Lambda rep] -> Doc #

(FreeDec (ExpDec rep), FreeDec (BodyDec rep), FreeIn (FParamInfo rep), FreeIn (LParamInfo rep), FreeIn (LetDec rep), FreeIn (RetType rep), FreeIn (BranchType rep), FreeIn (Op rep)) => FreeIn (Lambda rep) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: Lambda rep -> FV Source #

Substitutable rep => Substitute (Lambda rep) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Renameable rep => Rename (Lambda rep) Source # 
Instance details

Defined in Futhark.Transform.Rename

Methods

rename :: Lambda rep -> RenameM (Lambda rep) Source #

data BodyT rep Source #

A body consists of a number of bindings, terminating in a result (essentially a tuple literal).

Constructors

Body (BodyDec rep) (Stms rep) Result 

Instances

Instances details
RepTypes rep => Eq (BodyT rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(==) :: BodyT rep -> BodyT rep -> Bool #

(/=) :: BodyT rep -> BodyT rep -> Bool #

RepTypes rep => Ord (BodyT rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

compare :: BodyT rep -> BodyT rep -> Ordering #

(<) :: BodyT rep -> BodyT rep -> Bool #

(<=) :: BodyT rep -> BodyT rep -> Bool #

(>) :: BodyT rep -> BodyT rep -> Bool #

(>=) :: BodyT rep -> BodyT rep -> Bool #

max :: BodyT rep -> BodyT rep -> BodyT rep #

min :: BodyT rep -> BodyT rep -> BodyT rep #

RepTypes rep => Show (BodyT rep) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

showsPrec :: Int -> BodyT rep -> ShowS #

show :: BodyT rep -> String #

showList :: [BodyT rep] -> ShowS #

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

Defined in Futhark.IR.Pretty

Methods

ppr :: Body rep -> Doc #

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

pprList :: [Body rep] -> Doc #

(FreeDec (ExpDec rep), FreeDec (BodyDec rep), FreeIn (FParamInfo rep), FreeIn (LParamInfo rep), FreeIn (LetDec rep), FreeIn (RetType rep), FreeIn (BranchType rep), FreeIn (Op rep)) => FreeIn (Body rep) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: Body rep -> FV Source #

Substitutable rep => Substitute (Body rep) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> Body rep -> Body rep Source #

Renameable rep => Rename (Body rep) Source # 
Instance details

Defined in Futhark.Transform.Rename

Methods

rename :: Body rep -> RenameM (Body rep) Source #

newtype PatT dec Source #

A pattern is conceptually just a list of names and their types.

Constructors

Pat [PatElemT dec] 

Instances

Instances details
Functor PatT Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

fmap :: (a -> b) -> PatT a -> PatT b #

(<$) :: a -> PatT b -> PatT a #

Foldable PatT Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

fold :: Monoid m => PatT m -> m #

foldMap :: Monoid m => (a -> m) -> PatT a -> m #

foldMap' :: Monoid m => (a -> m) -> PatT a -> m #

foldr :: (a -> b -> b) -> b -> PatT a -> b #

foldr' :: (a -> b -> b) -> b -> PatT a -> b #

foldl :: (b -> a -> b) -> b -> PatT a -> b #

foldl' :: (b -> a -> b) -> b -> PatT a -> b #

foldr1 :: (a -> a -> a) -> PatT a -> a #

foldl1 :: (a -> a -> a) -> PatT a -> a #

toList :: PatT a -> [a] #

null :: PatT a -> Bool #

length :: PatT a -> Int #

elem :: Eq a => a -> PatT a -> Bool #

maximum :: Ord a => PatT a -> a #

minimum :: Ord a => PatT a -> a #

sum :: Num a => PatT a -> a #

product :: Num a => PatT a -> a #

Traversable PatT Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

traverse :: Applicative f => (a -> f b) -> PatT a -> f (PatT b) #

sequenceA :: Applicative f => PatT (f a) -> f (PatT a) #

mapM :: Monad m => (a -> m b) -> PatT a -> m (PatT b) #

sequence :: Monad m => PatT (m a) -> m (PatT a) #

Eq dec => Eq (PatT dec) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(==) :: PatT dec -> PatT dec -> Bool #

(/=) :: PatT dec -> PatT dec -> Bool #

Ord dec => Ord (PatT dec) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

compare :: PatT dec -> PatT dec -> Ordering #

(<) :: PatT dec -> PatT dec -> Bool #

(<=) :: PatT dec -> PatT dec -> Bool #

(>) :: PatT dec -> PatT dec -> Bool #

(>=) :: PatT dec -> PatT dec -> Bool #

max :: PatT dec -> PatT dec -> PatT dec #

min :: PatT dec -> PatT dec -> PatT dec #

Show dec => Show (PatT dec) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

showsPrec :: Int -> PatT dec -> ShowS #

show :: PatT dec -> String #

showList :: [PatT dec] -> ShowS #

Semigroup (PatT dec) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

(<>) :: PatT dec -> PatT dec -> PatT dec #

sconcat :: NonEmpty (PatT dec) -> PatT dec #

stimes :: Integral b => b -> PatT dec -> PatT dec #

Monoid (PatT dec) Source # 
Instance details

Defined in Futhark.IR.Syntax

Methods

mempty :: PatT dec #

mappend :: PatT dec -> PatT dec -> PatT dec #

mconcat :: [PatT dec] -> PatT dec #

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

Defined in Futhark.IR.Pretty

Methods

ppr :: PatT dec -> Doc #

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

pprList :: [PatT dec] -> Doc #

FreeIn dec => FreeIn (PatT dec) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: PatT dec -> FV Source #

Substitute dec => Substitute (PatT dec) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Methods

substituteNames :: Map VName VName -> PatT dec -> PatT dec Source #

Rename dec => Rename (PatT dec) Source # 
Instance details

Defined in Futhark.Transform.Rename

Methods

rename :: PatT dec -> RenameM (PatT dec) Source #

data PatElemT dec Source #

An element of a pattern - consisting of a name and an addditional parametric decoration. This decoration is what is expected to contain the type of the resulting variable.

Constructors

PatElem VName dec 

Instances

Instances details
Functor PatElemT Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fmap :: (a -> b) -> PatElemT a -> PatElemT b #

(<$) :: a -> PatElemT b -> PatElemT a #

Foldable PatElemT Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

fold :: Monoid m => PatElemT m -> m #

foldMap :: Monoid m => (a -> m) -> PatElemT a -> m #

foldMap' :: Monoid m => (a -> m) -> PatElemT a -> m #

foldr :: (a -> b -> b) -> b -> PatElemT a -> b #

foldr' :: (a -> b -> b) -> b -> PatElemT a -> b #

foldl :: (b -> a -> b) -> b -> PatElemT a -> b #

foldl' :: (b -> a -> b) -> b -> PatElemT a -> b #

foldr1 :: (a -> a -> a) -> PatElemT a -> a #

foldl1 :: (a -> a -> a) -> PatElemT a -> a #

toList :: PatElemT a -> [a] #

null :: PatElemT a -> Bool #

length :: PatElemT a -> Int #

elem :: Eq a => a -> PatElemT a -> Bool #

maximum :: Ord a => PatElemT a -> a #

minimum :: Ord a => PatElemT a -> a #

sum :: Num a => PatElemT a -> a #

product :: Num a => PatElemT a -> a #

Traversable PatElemT Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

traverse :: Applicative f => (a -> f b) -> PatElemT a -> f (PatElemT b) #

sequenceA :: Applicative f => PatElemT (f a) -> f (PatElemT a) #

mapM :: Monad m => (a -> m b) -> PatElemT a -> m (PatElemT b) #

sequence :: Monad m => PatElemT (m a) -> m (PatElemT a) #

Eq dec => Eq (PatElemT dec) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

(==) :: PatElemT dec -> PatElemT dec -> Bool #

(/=) :: PatElemT dec -> PatElemT dec -> Bool #

Ord dec => Ord (PatElemT dec) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

compare :: PatElemT dec -> PatElemT dec -> Ordering #

(<) :: PatElemT dec -> PatElemT dec -> Bool #

(<=) :: PatElemT dec -> PatElemT dec -> Bool #

(>) :: PatElemT dec -> PatElemT dec -> Bool #

(>=) :: PatElemT dec -> PatElemT dec -> Bool #

max :: PatElemT dec -> PatElemT dec -> PatElemT dec #

min :: PatElemT dec -> PatElemT dec -> PatElemT dec #

Show dec => Show (PatElemT dec) Source # 
Instance details

Defined in Futhark.IR.Syntax.Core

Methods

showsPrec :: Int -> PatElemT dec -> ShowS #

show :: PatElemT dec -> String #

showList :: [PatElemT dec] -> ShowS #

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

Defined in Futhark.IR.Pretty

Methods

ppr :: PatElemT t -> Doc #

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

pprList :: [PatElemT t] -> Doc #

SetType dec => SetType (PatElemT dec) Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

setType :: PatElemT dec -> Type -> PatElemT dec Source #

Typed dec => Typed (PatElemT dec) Source # 
Instance details

Defined in Futhark.IR.Prop.Types

Methods

typeOf :: PatElemT dec -> Type Source #

FreeIn dec => FreeIn (PatElemT dec) Source # 
Instance details

Defined in Futhark.IR.Prop.Names

Methods

freeIn' :: PatElemT dec -> FV Source #

Substitute dec => Substitute (PatElemT dec) Source # 
Instance details

Defined in Futhark.Transform.Substitute

Rename dec => Rename (PatElemT dec) Source # 
Instance details

Defined in Futhark.Transform.Rename

Methods

rename :: PatElemT dec -> RenameM (PatElemT dec) Source #

AliasesOf dec => AliasesOf (PatElemT dec) Source # 
Instance details

Defined in Futhark.IR.Prop.Aliases

Methods

aliasesOf :: PatElemT dec -> Names Source #