Safe Haskell | None |
---|---|
Language | Haskell98 |
LLVM.Extra.Scalar
Synopsis
- newtype T a = Cons {
- decons :: a
- liftM :: Monad m => (a -> m b) -> T a -> m (T b)
- liftM2 :: Monad m => (a -> b -> m c) -> T a -> T b -> m (T c)
- unliftM :: Monad m => (T a -> m (T r)) -> a -> m r
- unliftM2 :: Monad m => (T a -> T b -> m (T r)) -> a -> b -> m r
- unliftM3 :: Monad m => (T a -> T b -> T c -> m (T r)) -> a -> b -> c -> m r
- unliftM4 :: Monad m => (T a -> T b -> T c -> T d -> m (T r)) -> a -> b -> c -> d -> m r
- unliftM5 :: Monad m => (T a -> T b -> T c -> T d -> T e -> m (T r)) -> a -> b -> c -> d -> e -> m r
Documentation
The entire purpose of this datatype is to mark a type as scalar,
although it might also be interpreted as vector.
This way you can write generic operations for vectors
using the PseudoModule
class,
and specialise them to scalar types with respect to the PseudoRing
class.
From another perspective
you can consider the T
type constructor a marker
where the Scalar
type function
stops reducing nested vector types to scalar types.
Instances
Zero a => Zero (T a) Source # | |
Defined in LLVM.Extra.Scalar | |
Undefined a => Undefined (T a) Source # | |
Defined in LLVM.Extra.Scalar | |
Phi a => Phi (T a) Source # | |
Transcendental a => Transcendental (T a) Source # | |
Defined in LLVM.Extra.Scalar | |
Algebraic a => Algebraic (T a) Source # | |
Fraction a => Fraction (T a) Source # | |
Real a => Real (T a) Source # | |
RationalConstant a => RationalConstant (T a) Source # | |
Defined in LLVM.Extra.Scalar Methods fromRational' :: Rational -> T a Source # | |
Field a => Field (T a) Source # | |
IntegerConstant a => IntegerConstant (T a) Source # | |
Defined in LLVM.Extra.Scalar Methods fromInteger' :: Integer -> T a Source # | |
PseudoRing a => PseudoModule (T a) Source # | |
PseudoRing a => PseudoRing (T a) Source # | |
Additive a => Additive (T a) Source # | |
C a => C (T a) Source # | |
Defined in LLVM.Extra.Memory | |
type Scalar (T a) Source # | |
Defined in LLVM.Extra.Scalar | |
type Struct (T a) Source # | |
Defined in LLVM.Extra.Memory |