Safe Haskell | None |
---|---|
Language | Haskell2010 |
- module Prelude.EDSL
- module Control.Monad
- data Data a
- class (Syntactic a, Domain a ~ FeldDomain, Type (Internal a)) => Syntax a
- data Comp a
- module Data.Int
- module Data.Word
- data Complex a :: * -> * = ~a :+ ~a
- class (Eq a, Show a, Typeable a) => PrimType' a
- class (PrimType' a, Type a) => PrimType a
- class (Eq a, Show a, Typeable a, Inhabited a) => Type a
- type Length = Word32
- type Index = Word32
- data Ref a
- type DRef a = Ref (Data a)
- data Arr a
- type DArr a = Arr (Data a)
- data IArr a
- type DIArr a = IArr (Data a)
- class Inhabited a
- class Syntactic a where
- type family Domain a :: * -> *
- type family Internal a :: *
- eval :: (Syntactic a, Domain a ~ FeldDomain) => a -> Internal a
- showAST :: (Syntactic a, Domain a ~ FeldDomain) => a -> String
- drawAST :: (Syntactic a, Domain a ~ FeldDomain) => a -> IO ()
- module Feldspar.Frontend
- class Eq a => Bits a
- class Bits b => FiniteBits b
- class (Real a, Enum a) => Integral a where
- class Eq a => Ord a
- class (RealFrac a, Floating a) => RealFloat a
- class (Real a, Fractional a) => RealFrac a
- data Border i :: * -> *
- type IxRange i = (i, Int, Border i)
- data AssertionLabel
Documentation
module Prelude.EDSL
module Control.Monad
Types
Syntax
class (Syntactic a, Domain a ~ FeldDomain, Type (Internal a)) => Syntax a Source #
Specialization of the Syntactic
class for the Feldspar domain
Monad for computational effects: mutable data structures and control flow
Object-language types
module Data.Int
module Data.Word
Complex numbers are an algebraic type.
For a complex number z
,
is a number with the magnitude of abs
zz
,
but oriented in the positive real direction, whereas
has the phase of signum
zz
, but unit magnitude.
The Foldable
and Traversable
instances traverse the real part first.
~a :+ ~a infix 6 | forms a complex number from its real and imaginary rectangular components. |
class (Eq a, Show a, Typeable a) => PrimType' a Source #
Primitive supported types
PrimType' Bool Source # | |
PrimType' Double Source # | |
PrimType' Float Source # | |
PrimType' Int8 Source # | |
PrimType' Int16 Source # | |
PrimType' Int32 Source # | |
PrimType' Int64 Source # | |
PrimType' Word8 Source # | |
PrimType' Word16 Source # | |
PrimType' Word32 Source # | |
PrimType' Word64 Source # | |
PrimType' (Complex Double) Source # | |
PrimType' (Complex Float) Source # | |
InterpBi * (* -> Constraint, *) (AssertCMD (* -> *) (* -> Constraint)) IO (Param1 (* -> Constraint) PrimType') # | |
Syntactic (Struct PrimType' Data a) # | |
type Internal (Struct PrimType' Data a) # | |
type Domain (Struct PrimType' Data a) # | |
class (Eq a, Show a, Typeable a, Inhabited a) => Type a Source #
Supported types
Type Bool Source # | |
Type Double Source # | |
Type Float Source # | |
Type Int8 Source # | |
Type Int16 Source # | |
Type Int32 Source # | |
Type Int64 Source # | |
Type Word8 Source # | |
Type Word16 Source # | |
Type Word32 Source # | |
Type Word64 Source # | |
Type (Complex Double) Source # | |
Type (Complex Float) Source # | |
(Type a, Type b) => Type (a, b) Source # | |
Mutable array
Eq (Arr a) Source # |
|
Slicable (Arr a) Source # | |
Finite (Arr a) Source # | |
(MarshalHaskell (Internal a), MarshalFeld a, Syntax a) => MarshalFeld (Arr a) Source # | |
type SizeSpec (Arr a) Source # | |
type HaskellRep (Arr a) Source # | |
Immutable array
Inhabited types
type family Domain a :: * -> * #
type Domain () # | |
type Domain (Prim a) # | |
type Domain (Data a) # | |
type Domain (Option a) # | |
type Domain (Validated a) # | |
type Domain (a -> b) # | |
type Domain (a, b) # | |
type Domain (ASTF sym a) | |
type Domain (ASTFull sym a) | |
type Domain (a, b, c) # | |
type Domain (Struct PrimType' Data a) # | |
type Domain (a, b, c, d) # | |
type Domain (a, b, c, d, e) # | |
type Domain (a, b, c, d, e, f) # | |
type Domain (a, b, c, d, e, f, g) # | |
type Domain (a, b, c, d, e, f, g, h) # | |
type Domain (a, b, c, d, e, f, g, h, i) # | |
type Domain (a, b, c, d, e, f, g, h, i, j) # | |
type Domain (a, b, c, d, e, f, g, h, i, j, k) # | |
type Domain (a, b, c, d, e, f, g, h, i, j, k, l) # | |
type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m) # | |
type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # | |
type Domain (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # | |
type Internal () # | |
type Internal (Prim a) # | |
type Internal (Data a) # | |
type Internal (Option a) # | |
type Internal (Validated a) # | |
type Internal (a -> b) # | |
type Internal (a, b) # | |
type Internal (ASTF sym a) | |
type Internal (ASTFull sym a) | |
type Internal (a, b, c) # | |
type Internal (Struct PrimType' Data a) # | |
type Internal (a, b, c, d) # | |
type Internal (a, b, c, d, e) # | |
type Internal (a, b, c, d, e, f) # | |
type Internal (a, b, c, d, e, f, g) # | |
type Internal (a, b, c, d, e, f, g, h) # | |
type Internal (a, b, c, d, e, f, g, h, i) # | |
type Internal (a, b, c, d, e, f, g, h, i, j) # | |
type Internal (a, b, c, d, e, f, g, h, i, j, k) # | |
type Internal (a, b, c, d, e, f, g, h, i, j, k, l) # | |
type Internal (a, b, c, d, e, f, g, h, i, j, k, l, m) # | |
type Internal (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # | |
type Internal (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # | |
Front end
eval :: (Syntactic a, Domain a ~ FeldDomain) => a -> Internal a Source #
Evaluate a closed expression
showAST :: (Syntactic a, Domain a ~ FeldDomain) => a -> String Source #
Show the syntax tree using Unicode art
Only user assertions will be included.
drawAST :: (Syntactic a, Domain a ~ FeldDomain) => a -> IO () Source #
Draw the syntax tree on the terminal using Unicode art
Only user assertions will be included.
module Feldspar.Frontend
The Bits
class defines bitwise operations over integral types.
- Bits are numbered from 0 with bit 0 being the least significant bit.
class Bits b => FiniteBits b #
The FiniteBits
class denotes types with a finite, fixed number of bits.
Since: 4.7.0.0
class (Real a, Enum a) => Integral a where #
Integral numbers, supporting integer division.
Integral Int | |
Integral Int8 | |
Integral Int16 | |
Integral Int32 | |
Integral Int64 | |
Integral Integer | |
Integral Word | |
Integral Word8 | |
Integral Word16 | |
Integral Word32 | |
Integral Word64 | |
Integral Name | |
() :=> (Integral Int) | |
() :=> (Integral Integer) | |
Integral a => Integral (Identity a) | |
(Integral a) :=> (RealFrac (Ratio a)) | |
(Integral a) :=> (Real (Ratio a)) | |
(Integral a) :=> (Ord (Ratio a)) | |
(Integral a) :=> (Num (Ratio a)) | |
(Integral a) :=> (Fractional (Ratio a)) | |
(Integral a) :=> (Enum (Ratio a)) | |
Class (Real a, Enum a) (Integral a) | |
(Integral a, Show a) :=> (Show (Ratio a)) | |
(Integral a, Read a) :=> (Read (Ratio a)) | |
Integral a => Integral (Const k a b) | |
The Ord
class is used for totally ordered datatypes.
Instances of Ord
can be derived for any user-defined
datatype whose constituent types are in Ord
. The declared order
of the constructors in the data declaration determines the ordering
in derived Ord
instances. The Ordering
datatype allows a single
comparison to determine the precise ordering of two objects.
Minimal complete definition: either compare
or <=
.
Using compare
can be more efficient for complex types.
class (RealFrac a, Floating a) => RealFloat a #
Efficient, machine-independent access to the components of a floating-point number.
floatRadix, floatDigits, floatRange, decodeFloat, encodeFloat, isNaN, isInfinite, isDenormalized, isNegativeZero, isIEEE
RealFloat Double | |
RealFloat Float | |
() :=> (RealFloat Double) | |
() :=> (RealFloat Float) | |
RealFloat a => RealFloat (Identity a) | |
(RealFloat a) :=> (Num (Complex a)) | |
(RealFloat a) :=> (Fractional (Complex a)) | |
(RealFloat a) :=> (Floating (Complex a)) | |
Class (RealFrac a, Floating a) (RealFloat a) | |
RealFloat a => RealFloat (Const k a b) | |
class (Real a, Fractional a) => RealFrac a #
Extracting components of fractions.
RealFrac NominalDiffTime | |
RealFrac DiffTime | |
() :=> (RealFrac Double) | |
() :=> (RealFrac Float) | |
Integral a => RealFrac (Ratio a) | |
RealFrac a => RealFrac (Identity a) | |
(Integral a) :=> (RealFrac (Ratio a)) | |
Class (Real a, Fractional a) (RealFrac a) | |
Class (RealFrac a, Floating a) (RealFloat a) | |
RealFrac a => RealFrac (Const k a b) | |
type IxRange i = (i, Int, Border i) #
Index range
(lo,step,hi)
lo
gives the start index; step
gives the step length; hi
gives the stop
index which may be inclusive or exclusive.
data AssertionLabel Source #
Assertion labels
InternalAssertion | Internal assertion to guarantee meaningful results |
LibraryAssertion String | Assertion related to a specific library |
UserAssertion String | Assertion in user code. The default label for user assertions is
|