Safe Haskell | None |
---|
- newtype T a = Cons (Repr Value a)
- class C a where
- consPrimitive :: (IsConst al, Value al ~ Repr Value a) => al -> T a
- undefPrimitive :: (IsType al, Value al ~ Repr Value a) => T a
- zeroPrimitive :: (IsType al, Value al ~ Repr Value a) => T a
- phisPrimitive :: (IsFirstClass al, Value al ~ Repr Value a) => BasicBlock -> T a -> CodeGenFunction r (T a)
- addPhisPrimitive :: (IsFirstClass al, Value al ~ Repr Value a) => BasicBlock -> T a -> T a -> CodeGenFunction r ()
- consUnit :: Repr Value a ~ () => a -> T a
- undefUnit :: Repr Value a ~ () => T a
- zeroUnit :: Repr Value a ~ () => T a
- phisUnit :: Repr Value a ~ () => BasicBlock -> T a -> CodeGenFunction r (T a)
- addPhisUnit :: Repr Value a ~ () => BasicBlock -> T a -> T a -> CodeGenFunction r ()
- splitMaybe :: T (Maybe a) -> (T Bool, T a)
- toMaybe :: T Bool -> T a -> T (Maybe a)
- nothing :: C a => T (Maybe a)
- just :: T a -> T (Maybe a)
- fst :: T (a, b) -> T a
- snd :: T (a, b) -> T b
- curry :: (T (a, b) -> c) -> T a -> T b -> c
- uncurry :: (T a -> T b -> c) -> T (a, b) -> c
- mapFst :: (T a0 -> T a1) -> T (a0, b) -> T (a1, b)
- mapSnd :: (T b0 -> T b1) -> T (a, b0) -> T (a, b1)
- swap :: T (a, b) -> T (b, a)
- fst3 :: T (a, b, c) -> T a
- snd3 :: T (a, b, c) -> T b
- thd3 :: T (a, b, c) -> T c
- mapFst3 :: (T a0 -> T a1) -> T (a0, b, c) -> T (a1, b, c)
- mapSnd3 :: (T b0 -> T b1) -> T (a, b0, c) -> T (a, b1, c)
- mapThd3 :: (T c0 -> T c1) -> T (a, b, c0) -> T (a, b, c1)
- zip :: T a -> T b -> T (a, b)
- zip3 :: T a -> T b -> T c -> T (a, b, c)
- zip4 :: T a -> T b -> T c -> T d -> T (a, b, c, d)
- unzip :: T (a, b) -> (T a, T b)
- unzip3 :: T (a, b, c) -> (T a, T b, T c)
- unzip4 :: T (a, b, c, d) -> (T a, T b, T c, T d)
- consComplex :: T a -> T a -> T (Complex a)
- deconsComplex :: T (Complex a) -> (T a, T a)
- class Compose multituple where
- class Composed (Decomposed T pattern) ~ PatternTuple pattern => Decompose pattern where
- decompose :: pattern -> T (PatternTuple pattern) -> Decomposed T pattern
- type family Decomposed f pattern
- type family PatternTuple pattern
- modify :: (Compose a, Decompose pattern) => pattern -> (Decomposed T pattern -> a) -> T (PatternTuple pattern) -> T (Composed a)
- modify2 :: (Compose a, Decompose patternA, Decompose patternB) => patternA -> patternB -> (Decomposed T patternA -> Decomposed T patternB -> a) -> T (PatternTuple patternA) -> T (PatternTuple patternB) -> T (Composed a)
- modifyF :: (Compose a, Decompose pattern, Functor f) => pattern -> (Decomposed T pattern -> f a) -> T (PatternTuple pattern) -> f (T (Composed a))
- modifyF2 :: (Compose a, Decompose patternA, Decompose patternB, Functor f) => patternA -> patternB -> (Decomposed T patternA -> Decomposed T patternB -> f a) -> T (PatternTuple patternA) -> T (PatternTuple patternB) -> f (T (Composed a))
- data Atom a = Atom
- atom :: Atom a
- realPart :: T (Complex a) -> T a
- imagPart :: T (Complex a) -> T a
- lift1 :: (Repr Value a -> Repr Value b) -> T a -> T b
- liftM0 :: Monad m => m (Repr Value a) -> m (T a)
- liftM :: Monad m => (Repr Value a -> m (Repr Value b)) -> T a -> m (T b)
- liftM2 :: Monad m => (Repr Value a -> Repr Value b -> m (Repr Value c)) -> T a -> T b -> m (T c)
- liftM3 :: Monad m => (Repr Value a -> Repr Value b -> Repr Value c -> m (Repr Value d)) -> T a -> T b -> T c -> m (T d)
- class C a => IntegerConstant a where
- fromInteger' :: Integer -> T a
- class IntegerConstant a => RationalConstant a where
- fromRational' :: Rational -> T a
- class C a => Additive a where
- inc :: (Additive i, IntegerConstant i) => T i -> CodeGenFunction r (T i)
- dec :: (Additive i, IntegerConstant i) => T i -> CodeGenFunction r (T i)
- class Additive a => PseudoRing a where
- class PseudoRing a => Field a where
- type family Scalar vector :: *
- class (PseudoRing (Scalar v), Additive v) => PseudoModule v where
- class Additive a => Real a where
- class Real a => Fraction a where
- class (Repr Value i ~ Value ir, IsInteger ir, IntegerConstant ir, CmpRet ir, NumberOfElements ir ~ D1, CmpResult ir ~ Bool) => NativeInteger i ir
- class (Repr Value a ~ Value ar, IsFloating ar, RationalConstant ar, CmpRet ar, NumberOfElements ar ~ D1, CmpResult ar ~ Bool) => NativeFloating a ar
- truncateToInt :: (NativeInteger i ir, NativeFloating a ar) => T a -> CodeGenFunction r (T i)
- roundToIntFast :: (NativeInteger i ir, NativeFloating a ar) => T a -> CodeGenFunction r (T i)
- ceilingToInt :: (NativeInteger i ir, NativeFloating a ar) => T a -> CodeGenFunction r (T i)
- floorToInt :: (NativeInteger i ir, NativeFloating a ar) => T a -> CodeGenFunction r (T i)
- splitFractionToInt :: (NativeInteger i ir, NativeFloating a ar) => T a -> CodeGenFunction r (T (i, a))
- class Field a => Algebraic a where
- class Algebraic a => Transcendental a where
- class C a => Select a where
- class Real a => Comparison a where
- class Comparison a => FloatingComparison a where
- class Logic a where
- class BitShift a where
- class PseudoRing a => Integral a where
- fromIntegral :: (NativeInteger i ir, NativeFloating a ar) => T i -> CodeGenFunction r (T a)
Documentation
C T | |
C a => Phi (T a) | |
Select a => Select (T a) | |
C a => Zero (T a) | |
C a => Undefined (T a) | |
Transcendental a => Transcendental (T a) | |
Algebraic a => Algebraic (T a) | |
Logic a => Logic (T a) | |
FloatingComparison a => FloatingComparison (T a) | |
Comparison a => Comparison (T a) | |
Fraction a => Fraction (T a) | |
Real a => Real (T a) | |
RationalConstant a => RationalConstant (T a) | |
Field a => Field (T a) | |
IntegerConstant a => IntegerConstant (T a) | |
PseudoModule a => PseudoModule (T a) | |
PseudoRing a => PseudoRing (T a) | |
Additive a => Additive (T a) | |
Compose (T a) | |
C a => C (T a) |
consPrimitive :: (IsConst al, Value al ~ Repr Value a) => al -> T aSource
undefPrimitive :: (IsType al, Value al ~ Repr Value a) => T aSource
zeroPrimitive :: (IsType al, Value al ~ Repr Value a) => T aSource
phisPrimitive :: (IsFirstClass al, Value al ~ Repr Value a) => BasicBlock -> T a -> CodeGenFunction r (T a)Source
addPhisPrimitive :: (IsFirstClass al, Value al ~ Repr Value a) => BasicBlock -> T a -> T a -> CodeGenFunction r ()Source
class Composed (Decomposed T pattern) ~ PatternTuple pattern => Decompose pattern whereSource
decompose :: pattern -> T (PatternTuple pattern) -> Decomposed T patternSource
A nested unzip
.
Since it is not obvious how deep to decompose nested tuples,
you must provide a pattern of the decomposed tuple.
E.g.
f :: MultiValue ((a,b),(c,d)) -> ((MultiValue a, MultiValue b), MultiValue (c,d)) f = decompose ((atom,atom),atom)
type family Decomposed f pattern Source
type family PatternTuple pattern Source
modify :: (Compose a, Decompose pattern) => pattern -> (Decomposed T pattern -> a) -> T (PatternTuple pattern) -> T (Composed a)Source
modify2 :: (Compose a, Decompose patternA, Decompose patternB) => patternA -> patternB -> (Decomposed T patternA -> Decomposed T patternB -> a) -> T (PatternTuple patternA) -> T (PatternTuple patternB) -> T (Composed a)Source
modifyF :: (Compose a, Decompose pattern, Functor f) => pattern -> (Decomposed T pattern -> f a) -> T (PatternTuple pattern) -> f (T (Composed a))Source
modifyF2 :: (Compose a, Decompose patternA, Decompose patternB, Functor f) => patternA -> patternB -> (Decomposed T patternA -> Decomposed T patternB -> f a) -> T (PatternTuple patternA) -> T (PatternTuple patternB) -> f (T (Composed a))Source
liftM2 :: Monad m => (Repr Value a -> Repr Value b -> m (Repr Value c)) -> T a -> T b -> m (T c)Source
liftM3 :: Monad m => (Repr Value a -> Repr Value b -> Repr Value c -> m (Repr Value d)) -> T a -> T b -> T c -> m (T d)Source
class C a => IntegerConstant a whereSource
fromInteger' :: Integer -> T aSource
class IntegerConstant a => RationalConstant a whereSource
fromRational' :: Rational -> T aSource
class Additive a => PseudoRing a whereSource
class PseudoRing a => Field a whereSource
class (PseudoRing (Scalar v), Additive v) => PseudoModule v whereSource
class (Repr Value i ~ Value ir, IsInteger ir, IntegerConstant ir, CmpRet ir, NumberOfElements ir ~ D1, CmpResult ir ~ Bool) => NativeInteger i ir Source
class (Repr Value a ~ Value ar, IsFloating ar, RationalConstant ar, CmpRet ar, NumberOfElements ar ~ D1, CmpResult ar ~ Bool) => NativeFloating a ar Source
truncateToInt :: (NativeInteger i ir, NativeFloating a ar) => T a -> CodeGenFunction r (T i)Source
roundToIntFast :: (NativeInteger i ir, NativeFloating a ar) => T a -> CodeGenFunction r (T i)Source
ceilingToInt :: (NativeInteger i ir, NativeFloating a ar) => T a -> CodeGenFunction r (T i)Source
floorToInt :: (NativeInteger i ir, NativeFloating a ar) => T a -> CodeGenFunction r (T i)Source
splitFractionToInt :: (NativeInteger i ir, NativeFloating a ar) => T a -> CodeGenFunction r (T (i, a))Source
class Algebraic a => Transcendental a whereSource
class Real a => Comparison a whereSource
class Comparison a => FloatingComparison a whereSource
fromIntegral :: (NativeInteger i ir, NativeFloating a ar) => T i -> CodeGenFunction r (T a)Source