llvm-hs-pure 4.1.0.0 → 5.0.0
raw patch · 9 files changed
+43/−7 lines, 9 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- LLVM.AST.CallingConvention: X86_64_Win64 :: CallingConvention
- LLVM.AST.Instruction: CrossThread :: SynchronizationScope
+ LLVM.AST.Attribute: Speculatable :: FunctionAttribute
+ LLVM.AST.CallingConvention: Win64 :: CallingConvention
+ LLVM.AST.FunctionAttribute: Speculatable :: FunctionAttribute
+ LLVM.AST.Instruction: System :: SynchronizationScope
+ LLVM.AST.Type: LabelType :: Type
+ LLVM.Prelude: (<>) :: Monoid m => m -> m -> m
+ LLVM.Prelude: findM :: Monad m => (a -> m Bool) -> [a] -> m (Maybe a)
+ LLVM.Prelude: ifM :: Monad m => m Bool -> m a -> m a -> m a
+ LLVM.Prelude: infixr 6 <>
+ LLVM.Prelude: leftBiasedZip :: [a] -> [b] -> [(a, Maybe b)]
Files
- CHANGELOG.md +14/−0
- llvm-hs-pure.cabal +2/−2
- src/LLVM/AST/CallingConvention.hs +1/−1
- src/LLVM/AST/FunctionAttribute.hs +1/−0
- src/LLVM/AST/Instruction.hs +1/−1
- src/LLVM/AST/Name.hs +0/−1
- src/LLVM/AST/Type.hs +2/−0
- src/LLVM/DataLayout.hs +0/−1
- src/LLVM/Prelude.hs +22/−1
CHANGELOG.md view
@@ -1,3 +1,17 @@+## 5.0.0 (2017-09-07)++* Support for LLVM 5.0++ We only give a summary of the changes affecting the public API of `llvm-hs-pure` here.+ Please refer to the official+ [release notes for LLVM 5.0](http://releases.llvm.org/5.0.0/docs/ReleaseNotes.html)+ for an overview of all changes in LLVM 5.0.++ * The `X86_64_Win64` calling convention is now called `Win64`.+ * There is a new `Speculatable` function attribute.+ * The `CrossThread` synchronization scope has been removed. There is+ now a new `System` synchronization scope.+ ## 4.1.0 (2017-05-17) * Switch AST to `ByteString`/`ShortByteString` reflecting LLVM’s use
llvm-hs-pure.cabal view
@@ -1,5 +1,5 @@ name: llvm-hs-pure-version: 4.1.0.0+version: 5.0.0 license: BSD3 license-file: LICENSE author: Anthony Cowley, Stephen Diehl, Moritz Kiefer <moritz.kiefer@purelyfunctional.org>, Benjamin S. Scarlet@@ -22,7 +22,7 @@ source-repository head type: git location: git://github.com/llvm-hs/llvm-hs.git- branch: llvm-4+ branch: llvm-5 flag semigroups description: Add semigroups to build-depends for Data.List.NonEmpty. This will be selected automatically by cabal.
src/LLVM/AST/CallingConvention.hs view
@@ -27,7 +27,7 @@ | SPIR_KERNEL | Intel_OCL_BI | X86_64_SysV- | X86_64_Win64+ | Win64 | Numbered Word32 deriving (Eq, Read, Show, Typeable, Data, Generic)
src/LLVM/AST/FunctionAttribute.hs view
@@ -34,6 +34,7 @@ | SanitizeAddress | SanitizeThread | SanitizeMemory+ | Speculatable | StringAttribute { stringAttributeKind :: ShortByteString, stringAttributeValue :: ShortByteString -- ^ Use "" for no value -- the two are conflated
src/LLVM/AST/Instruction.hs view
@@ -109,7 +109,7 @@ -- | <http://llvm.org/docs/LangRef.html#singlethread> data SynchronizationScope = SingleThread- | CrossThread+ | System deriving (Eq, Ord, Read, Show, Data, Typeable, Generic) -- | An 'Atomicity' describes constraints on the visibility of effects of an atomic instruction
src/LLVM/AST/Name.hs view
@@ -3,7 +3,6 @@ import LLVM.Prelude import Data.Char-import Data.Monoid import Data.String {- |
src/LLVM/AST/Type.hs view
@@ -39,6 +39,8 @@ -- | <http://llvm.org/docs/LangRef.html#metadata-type> | MetadataType -- only to be used as a parameter type for a few intrinsics -- | <http://llvm.org/docs/LangRef.html#token-type>+ | LabelType -- only to be used as the type of block names+ -- | <http://llvm.org/docs/LangRef.html#label-type> | TokenType deriving (Eq, Ord, Read, Show, Typeable, Data, Generic)
src/LLVM/DataLayout.hs view
@@ -13,7 +13,6 @@ import Data.ByteString.Char8 as ByteString hiding (map, foldr) import qualified Data.List as List import qualified Data.Map as Map-import Data.Monoid import qualified Data.Set as Set import LLVM.AST.DataLayout
src/LLVM/Prelude.hs view
@@ -14,7 +14,11 @@ module Control.Monad, ByteString, ShortByteString,- fromMaybe+ fromMaybe,+ leftBiasedZip,+ findM,+ ifM,+ (<>) ) where import Prelude hiding (@@ -30,6 +34,7 @@ import GHC.Generics (Generic) import Data.Int import Data.Maybe (fromMaybe)+import Data.Monoid ((<>)) import Data.Word import Data.Functor import Data.Foldable@@ -44,3 +49,19 @@ import Data.ByteString (ByteString) import Data.ByteString.Short (ShortByteString)++leftBiasedZip :: [a] -> [b] -> [(a, Maybe b)]+leftBiasedZip [] _ = []+leftBiasedZip xs [] = map (, Nothing) xs+leftBiasedZip (x:xs) (y:ys) = (x, Just y) : leftBiasedZip xs ys++ifM :: Monad m => m Bool -> m a -> m a -> m a+ifM cond ifTrue ifFalse = do+ cond' <- cond+ if cond'+ then ifTrue+ else ifFalse++findM :: Monad m => (a -> m Bool) -> [a] -> m (Maybe a)+findM _ [] = return Nothing+findM p (x:xs) = ifM (p x) (return $ Just x) (findM p xs)