llvm-extra-0.8.1: Utility functions for the llvm interface

Safe HaskellNone

LLVM.Extra.Scalar

Synopsis

Documentation

newtype T a Source

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.

Constructors

Cons 

Fields

decons :: a
 

Instances

Phi a => Phi (T a) 
Zero a => Zero (T a) 
Undefined a => Undefined (T a) 
Transcendental a => Transcendental (T a) 
Algebraic a => Algebraic (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) 
PseudoRing a => PseudoModule (T a) 
PseudoRing a => PseudoRing (T a) 
Additive a => Additive (T a) 
C a => C (T a) 

liftM :: Monad m => (a -> m b) -> T a -> m (T b)Source

liftM2 :: Monad m => (a -> b -> m c) -> T a -> T b -> m (T c)Source

unliftM :: Monad m => (T a -> m (T r)) -> a -> m rSource

unliftM2 :: Monad m => (T a -> T b -> m (T r)) -> a -> b -> m rSource

unliftM3 :: Monad m => (T a -> T b -> T c -> m (T r)) -> a -> b -> c -> m rSource

unliftM4 :: Monad m => (T a -> T b -> T c -> T d -> m (T r)) -> a -> b -> c -> d -> m rSource

unliftM5 :: Monad m => (T a -> T b -> T c -> T d -> T e -> m (T r)) -> a -> b -> c -> d -> e -> m rSource