Safe Haskell | None |
---|---|
Language | Haskell2010 |
Language.Futhark.Core
Description
This module contains very basic definitions for Futhark - so basic, that they can be shared between the internal and external representation.
Synopsis
- data Uniqueness
- data StreamOrd
- data Commutativity
- locStr :: SrcLoc -> String
- data Name
- nameToString :: Name -> String
- nameFromString :: String -> Name
- nameToText :: Name -> Text
- nameFromText :: Text -> Name
- data VName = VName !Name !Int
- baseTag :: VName -> Int
- baseName :: VName -> Name
- baseString :: VName -> String
- pretty :: Pretty a => a -> String
- defaultEntryPoint :: Name
- data Int8
- data Int16
- data Int32
- data Int64
- data Word8
- data Word16
- data Word32
- data Word64
Documentation
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
Eq StreamOrd Source # | |
Ord StreamOrd Source # | |
Show StreamOrd Source # | |
data Commutativity Source #
Whether some operator is commutative or not. The Monoid
instance returns the least commutative of its arguments.
Constructors
Noncommutative | |
Commutative |
Instances
Location utilities
locStr :: SrcLoc -> String Source #
A human-readable location string, of the form
filename:lineno:columnno
.
Name handling
The abstract (not really) type representing names in the Futhark
compiler. String
s, being lists of characters, are very slow,
while Text
s are based on byte-arrays.
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.
A name tagged with some integer. Only the integer is used in
comparisons, no matter the type of vn
.
Instances
Special identifiers
defaultEntryPoint :: Name Source #
The name of the default program entry point (main).
Integer re-export
8-bit signed integer type
Instances
16-bit signed integer type
Instances
32-bit signed integer type
Instances
64-bit signed integer type
Instances
8-bit unsigned integer type
Instances
16-bit unsigned integer type
Instances
32-bit unsigned integer type
Instances
64-bit unsigned integer type