llvm-tf 15.0 → 16.0
raw patch · 3 files changed
+19/−15 lines, 3 filesdep ~llvm-ffi
Dependency ranges changed: llvm-ffi
Files
- llvm-tf.cabal +3/−3
- private/LLVM/Core/Instructions.hs +9/−8
- private/LLVM/Core/Instructions/Private.hs +7/−4
llvm-tf.cabal view
@@ -1,5 +1,5 @@ Name: llvm-tf-Version: 15.0+Version: 16.0 License: BSD3 License-File: LICENSE Synopsis: Bindings to the LLVM compiler toolkit using type families.@@ -37,7 +37,7 @@ Location: http://code.haskell.org/~thielema/llvm-tf/ Source-Repository this- Tag: 15.0+ Tag: 16.0 Type: darcs Location: http://code.haskell.org/~thielema/llvm-tf/ @@ -53,7 +53,7 @@ Library private Default-Language: Haskell98 Build-Depends:- llvm-ffi >=15.0 && <16.0,+ llvm-ffi >=15.0 && <17.0, tfp >=1.0 && <1.1, transformers >=0.3 && <0.7, storable-record >=0.0.2 && <0.1,
private/LLVM/Core/Instructions.hs view
@@ -81,7 +81,8 @@ import qualified LLVM.Core.Proxy as LP import qualified LLVM.Core.CodeGen as CodeGen import LLVM.Core.Instructions.Private- (ValueCons, unValue, convert, unop, binopValue, proxyFromValuePtr,+ (ValueCons, unValue, convert,+ unop, unopValue, binopValue, proxyFromValuePtr, FFIBinOp, FFIConstBinOp, GetField, FieldType, GetElementPtr, ElementPtrType, IsIndexArg, IsIndexType, getIxList, getArg,@@ -493,12 +494,12 @@ U.withEmptyCString $ op bld a1 a2 neg ::- (ValueCons value, IsArithmetic a) =>- value a -> CodeGenFunction r (value a)+ (IsArithmetic a) =>+ Value a -> CodeGenFunction r (Value a) neg = withArithmeticType $ \typ -> case typ of- IntegerType -> unop FFI.constNeg FFI.buildNeg- FloatingType -> unop FFI.constFNeg FFI.buildFNeg+ IntegerType -> unopValue FFI.buildNeg+ FloatingType -> unopValue FFI.buildFNeg ineg :: (ValueCons value, IsInteger a) =>@@ -515,9 +516,9 @@ else unop FFI.constNUWNeg FFI.buildNUWNeg fneg ::- (ValueCons value, IsFloating a) =>- value a -> CodeGenFunction r (value a)-fneg = unop FFI.constFNeg FFI.buildFNeg+ (IsFloating a) =>+ Value a -> CodeGenFunction r (Value a)+fneg = unopValue FFI.buildFNeg inv :: (ValueCons value, IsInteger a) =>
private/LLVM/Core/Instructions/Private.hs view
@@ -109,10 +109,13 @@ getUnOp $ switchValueCons (UnOp $ \(ConstValue a) -> liftIO $ fmap ConstValue $ cop a)- (UnOp $ \(Value a) ->- liftM Value $- withCurrentBuilder $ \ bld ->- U.withEmptyCString $ op bld a)+ (UnOp $ unopValue op)++unopValue :: FFIUnOp -> Value a -> CodeGenFunction r (Value b)+unopValue op (Value a) =+ liftM Value $+ withCurrentBuilder $ \ bld ->+ U.withEmptyCString $ op bld a newtype BinOp a b c r value = BinOp {getBinOp :: value a -> value b -> CodeGenFunction r (value c)}