llvm-extra-0.12.0.1: Utility functions for the llvm interface
Safe HaskellSafe-Inferred
LanguageHaskell98

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

Instances

Instances details
Additive a => Additive (T a) Source # 
Instance details

Defined in LLVM.Extra.Scalar

Methods

zero :: T a Source #

add :: T a -> T a -> CodeGenFunction r (T a) Source #

sub :: T a -> T a -> CodeGenFunction r (T a) Source #

neg :: T a -> CodeGenFunction r (T a) Source #

Algebraic a => Algebraic (T a) Source # 
Instance details

Defined in LLVM.Extra.Scalar

Methods

sqrt :: T a -> CodeGenFunction r (T a) Source #

Field a => Field (T a) Source # 
Instance details

Defined in LLVM.Extra.Scalar

Methods

fdiv :: T a -> T a -> CodeGenFunction r (T a) Source #

Fraction a => Fraction (T a) Source # 
Instance details

Defined in LLVM.Extra.Scalar

Methods

truncate :: T a -> CodeGenFunction r (T a) Source #

fraction :: T a -> CodeGenFunction r (T a) Source #

IntegerConstant a => IntegerConstant (T a) Source # 
Instance details

Defined in LLVM.Extra.Scalar

Methods

fromInteger' :: Integer -> T a Source #

PseudoRing a => PseudoModule (T a) Source # 
Instance details

Defined in LLVM.Extra.Scalar

Methods

scale :: Scalar (T a) -> T a -> CodeGenFunction r (T a) Source #

PseudoRing a => PseudoRing (T a) Source # 
Instance details

Defined in LLVM.Extra.Scalar

Methods

mul :: T a -> T a -> CodeGenFunction r (T a) Source #

RationalConstant a => RationalConstant (T a) Source # 
Instance details

Defined in LLVM.Extra.Scalar

Real a => Real (T a) Source # 
Instance details

Defined in LLVM.Extra.Scalar

Methods

min :: T a -> T a -> CodeGenFunction r (T a) Source #

max :: T a -> T a -> CodeGenFunction r (T a) Source #

abs :: T a -> CodeGenFunction r (T a) Source #

signum :: T a -> CodeGenFunction r (T a) Source #

Transcendental a => Transcendental (T a) Source # 
Instance details

Defined in LLVM.Extra.Scalar

Methods

pi :: CodeGenFunction r (T a) Source #

sin :: T a -> CodeGenFunction r (T a) Source #

cos :: T a -> CodeGenFunction r (T a) Source #

exp :: T a -> CodeGenFunction r (T a) Source #

log :: T a -> CodeGenFunction r (T a) Source #

pow :: T a -> T a -> CodeGenFunction r (T a) Source #

C a => C (T a) Source # 
Instance details

Defined in LLVM.Extra.Memory

Associated Types

type Struct (T a) Source #

Methods

load :: Value (Ptr (Struct (T a))) -> CodeGenFunction r (T a) Source #

store :: T a -> Value (Ptr (Struct (T a))) -> CodeGenFunction r () Source #

decompose :: Value (Struct (T a)) -> CodeGenFunction r (T a) Source #

compose :: T a -> CodeGenFunction r (Value (Struct (T a))) Source #

Phi a => Phi (T a) Source # 
Instance details

Defined in LLVM.Extra.Scalar

Methods

phi :: BasicBlock -> T a -> CodeGenFunction r (T a) Source #

addPhi :: BasicBlock -> T a -> T a -> CodeGenFunction r () Source #

Undefined a => Undefined (T a) Source # 
Instance details

Defined in LLVM.Extra.Scalar

Methods

undef :: T a Source #

Zero a => Zero (T a) Source # 
Instance details

Defined in LLVM.Extra.Scalar

Methods

zero :: T a Source #

type Scalar (T a) Source # 
Instance details

Defined in LLVM.Extra.Scalar

type Scalar (T a) = T a
type Struct (T a) Source # 
Instance details

Defined in LLVM.Extra.Memory

type Struct (T a) = Struct 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 r Source #

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

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

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

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