packages feed

llvm-general-pure 3.4.5.2 → 3.4.5.3

raw patch · 24 files changed

+112/−44 lines, 24 filesdep ~basedep ~llvm-general-purePVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

Dependency ranges changed: base, llvm-general-pure

API changes (from Hackage documentation)

+ LLVM.General.TH: appT :: Typish qt => qt -> Q Type -> qt
+ LLVM.General.TH: conT :: Typish qt => Name -> qt
+ LLVM.General.TH: instance Typish (Q Pred)
+ LLVM.General.TH: instance Typish (Q Type)

Files

+ changelog view
@@ -0,0 +1,5 @@+-*-change-log-*-++3.4.5.3 Benjamin S. Scarlet <fgthb0@greynode.net> 2015-04-11+	* Clean up warnings with ghc-7.10+	* Start changelog
llvm-general-pure.cabal view
@@ -1,5 +1,5 @@ name: llvm-general-pure-version: 3.4.5.2+version: 3.4.5.3 license: BSD3 license-file: LICENSE author: Benjamin S.Scarlet <fgthb0@greynode.net>@@ -14,7 +14,9 @@   llvm-general-pure is a set of pure Haskell types and functions for interacting with LLVM <http://llvm.org/>.   It includes an ADT to represent LLVM IR (<http://llvm.org/docs/LangRef.html>). The llvm-general package   builds on this one with FFI bindings to LLVM, but llvm-general-pure does not require LLVM to be available.-   +extra-source-files:+  changelog+ source-repository head   type: git   location: git://github.com/bscarlet/llvm-general.git@@ -23,7 +25,7 @@   type: git   location: git://github.com/bscarlet/llvm-general.git   branch: llvm-3.4-  tag: pure-v3.4.5.2+  tag: pure-v3.4.5.3  library   ghc-options: -fwarn-unused-imports@@ -38,6 +40,7 @@     parsec >= 3.1.3   hs-source-dirs: src   extensions:+    NoImplicitPrelude     TupleSections     DeriveDataTypeable     EmptyDataDecls@@ -66,6 +69,8 @@     LLVM.General.AST.Visibility     LLVM.General.DataLayout     LLVM.General.PrettyPrint+    LLVM.General.Prelude+    LLVM.General.TH    other-modules:     LLVM.General.Internal.PrettyPrint@@ -79,7 +84,7 @@     HUnit >= 1.2.4.2,     test-framework-quickcheck2 >= 0.3.0.1,     QuickCheck >= 2.5.1.1,-    llvm-general-pure == 3.4.5.2,+    llvm-general-pure == 3.4.5.3,     containers >= 0.4.2.1,     mtl >= 2.1.3   hs-source-dirs: test
src/LLVM/General/AST.hs view
@@ -16,7 +16,7 @@   module LLVM.General.AST.Type   ) where -import Data.Data+import LLVM.General.Prelude  import LLVM.General.AST.Name import LLVM.General.AST.Type (Type(..), FloatingPointFormat(..))
src/LLVM/General/AST/AddrSpace.hs view
@@ -1,8 +1,7 @@ -- | Pointers exist in Address Spaces  module LLVM.General.AST.AddrSpace where -import Data.Data-import Data.Word+import LLVM.General.Prelude  -- | See <http://llvm.org/docs/LangRef.html#pointer-type> data AddrSpace = AddrSpace Word32
src/LLVM/General/AST/Attribute.hs view
@@ -1,8 +1,7 @@ -- | Module to allow importing 'Attribute' distinctly qualified. module LLVM.General.AST.Attribute where -import Data.Data-import Data.Word+import LLVM.General.Prelude  -- | <http://llvm.org/docs/LangRef.html#parameter-attributes> data ParameterAttribute
src/LLVM/General/AST/CallingConvention.hs view
@@ -1,8 +1,7 @@ -- | Module to allow importing 'CallingConvention' distinctly qualified. module LLVM.General.AST.CallingConvention where -import Data.Data-import Data.Word+import LLVM.General.Prelude  -- |  <http://llvm.org/docs/LangRef.html#callingconv> data CallingConvention = C | Fast | Cold | GHC | Numbered Word32
src/LLVM/General/AST/Constant.hs view
@@ -1,8 +1,8 @@ -- | A representation of LLVM constants module LLVM.General.AST.Constant where -import Data.Data-import Data.Word (Word32)+import LLVM.General.Prelude+ import Data.Bits ((.|.), (.&.), complement, testBit, shiftL)  import LLVM.General.AST.Type
src/LLVM/General/AST/DataLayout.hs view
@@ -1,8 +1,7 @@ -- | <http://llvm.org/docs/LangRef.html#data-layout> module LLVM.General.AST.DataLayout where -import Data.Data-import Data.Word+import LLVM.General.Prelude  import Data.Map (Map) import qualified Data.Map as Map
src/LLVM/General/AST/FloatingPointPredicate.hs view
@@ -1,7 +1,7 @@ -- | Predicates for the 'LLVM.General.AST.Instruction.FCmp' instruction module LLVM.General.AST.FloatingPointPredicate where -import Data.Data+import LLVM.General.Prelude  -- | <http://llvm.org/docs/LangRef.html#fcmp-instruction> data FloatingPointPredicate
src/LLVM/General/AST/Global.hs view
@@ -1,8 +1,7 @@ -- | 'Global's - top-level values in 'Module's - and supporting structures. module LLVM.General.AST.Global where -import Data.Data-import Data.Word+import LLVM.General.Prelude  import LLVM.General.AST.Name import LLVM.General.AST.Type
src/LLVM/General/AST/InlineAssembly.hs view
@@ -1,7 +1,7 @@ -- | A representation of an LLVM inline assembly module LLVM.General.AST.InlineAssembly where -import Data.Data+import LLVM.General.Prelude  import LLVM.General.AST.Type 
src/LLVM/General/AST/Instruction.hs view
@@ -2,8 +2,7 @@ -- <http://llvm.org/docs/LangRef.html#instruction-reference> module LLVM.General.AST.Instruction where -import Data.Data-import Data.Word+import LLVM.General.Prelude  import LLVM.General.AST.Type import LLVM.General.AST.Name
src/LLVM/General/AST/IntegerPredicate.hs view
@@ -1,7 +1,7 @@ -- | Predicates for the 'LLVM.General.AST.Instruction.ICmp' instruction module LLVM.General.AST.IntegerPredicate where -import Data.Data+import LLVM.General.Prelude  -- | <http://llvm.org/docs/LangRef.html#icmp-instruction> data IntegerPredicate
src/LLVM/General/AST/Linkage.hs view
@@ -1,7 +1,7 @@ -- | Module to allow importing 'Linkage' distinctly qualified. module LLVM.General.AST.Linkage where -import Data.Data+import LLVM.General.Prelude  -- | <http://llvm.org/docs/LangRef.html#linkage> data Linkage
src/LLVM/General/AST/Name.hs view
@@ -1,8 +1,7 @@ -- | Names as used in LLVM IR module LLVM.General.AST.Name where -import Data.Data-import Data.Word+import LLVM.General.Prelude  {- | Objects of various sorts in LLVM IR are identified by address in the LLVM C++ API, and
src/LLVM/General/AST/Operand.hs view
@@ -1,8 +1,7 @@ -- | A type to represent operands to LLVM 'LLVM.General.AST.Instruction.Instruction's module LLVM.General.AST.Operand where -import Data.Data-import Data.Word+import LLVM.General.Prelude  import LLVM.General.AST.Name import LLVM.General.AST.Constant
src/LLVM/General/AST/RMWOperation.hs view
@@ -1,7 +1,7 @@ -- | Operations for the 'LLVM.General.AST.Instruction.AtomicRMW' instruction module LLVM.General.AST.RMWOperation where -import Data.Data+import LLVM.General.Prelude  -- | <http://llvm.org/docs/LangRef.html#atomicrmw-instruction> data RMWOperation
src/LLVM/General/AST/Type.hs view
@@ -1,8 +1,7 @@ -- | A representation of an LLVM type module LLVM.General.AST.Type where -import Data.Data-import Data.Word (Word32, Word64)+import LLVM.General.Prelude  import LLVM.General.AST.AddrSpace import LLVM.General.AST.Name
src/LLVM/General/AST/Visibility.hs view
@@ -1,7 +1,7 @@ -- | Module to allow importing 'Visibility' distinctly qualified. module LLVM.General.AST.Visibility where -import Data.Data+import LLVM.General.Prelude  -- | <http://llvm.org/docs/LangRef.html#visibility> data Visibility = Default | Hidden | Protected
src/LLVM/General/DataLayout.hs view
@@ -3,9 +3,7 @@  parseDataLayout  ) where -import Control.Applicative--import Data.Word+import LLVM.General.Prelude  import qualified Data.List as List import qualified Data.Map as Map
src/LLVM/General/Internal/PrettyPrint.hs view
@@ -6,22 +6,21 @@   #-} module LLVM.General.Internal.PrettyPrint where -import Language.Haskell.TH +import LLVM.General.Prelude++import LLVM.General.TH  import Language.Haskell.TH.Quote  import Data.Monoid import Data.String-import Data.Data-import Data.Word import Data.Maybe -import Data.List+import Data.List (intercalate) import Data.Set (Set) import qualified Data.Set as Set import Data.Map (Map) import qualified Data.Map as Map-import Control.Applicative ((<$>),(<*>))-import Control.Monad.Reader+import Control.Monad.Reader hiding (sequence, mapM)  data Branch   = Fixed String@@ -168,7 +167,7 @@           x -> error $ "unexpected info: " ++ show x   cs <- mapM (const $ newName "a") tvb   let cvs = map varT cs-  sequence . return $ instanceD (cxt [classP (mkName "PrettyShow") [cv] | cv <- cvs]) [t| PrettyShow $(foldl appT (conT n) cvs) |] [+  sequence . return $ instanceD (cxt [appT (conT (mkName "PrettyShow")) cv | cv <- cvs]) [t| PrettyShow $(foldl appT (conT n) cvs) |] [     funD (mkName "prettyShow") [        clause          [varP (mkName "a")] (
+ src/LLVM/General/Prelude.hs view
@@ -0,0 +1,38 @@+-- | This module is presents a prelude mostly like the post-Applicative-Monad world of+-- base >= 4.8 / ghc >= 7.10, even on earlier versions. It's intended as an internal library+-- for llvm-general-pure and llvm-general; it's exposed only to be shared between the two.+module LLVM.General.Prelude (+    module Prelude,+    module Data.Data,+    module Data.Int,+    module Data.Word,+    module Data.Functor,+    module Data.Foldable,+    module Data.Traversable,+    module Control.Applicative,+    module Control.Monad+    ) where++import Prelude hiding (+    mapM, mapM_,+    sequence, sequence_,+    concat,+    foldr, foldr1, foldl, foldl1,+    minimum, maximum, sum, product, all, any, and, or,+    concatMap,+    elem, notElem,+    msum,+  )+import Data.Data hiding (typeOf)+import Data.Int+import Data.Word+import Data.Functor+import Data.Foldable+import Data.Traversable+import Control.Applicative+import Control.Monad hiding (+    forM, forM_,+    mapM, mapM_,+    sequence, sequence_,+    msum+  )
src/LLVM/General/PrettyPrint.hs view
@@ -17,8 +17,8 @@   imports   ) where -import Control.Monad-import Data.Functor+import LLVM.General.Prelude+ import Data.Monoid import Data.Map (Map) import qualified Data.Map as Map@@ -38,7 +38,7 @@ import qualified LLVM.General.AST.InlineAssembly as A import qualified LLVM.General.AST.RMWOperation as A -liftM concat $ mapM makePrettyShowInstance [+fmap concat $ mapM makePrettyShowInstance [   ''A.Module,   ''A.Definition,   ''A.DataLayout,
+ src/LLVM/General/TH.hs view
@@ -0,0 +1,32 @@+{-# LANGUAGE CPP #-}+-- | This module is presents template haskell mostly like the template-haskell >= 2.10 / ghc >= 7.10,+-- even on earlier versions. It's intended as an internal library for llvm-general-pure and llvm-general;+-- it's exposed only to be shared between the two.+module LLVM.General.TH (+    module Language.Haskell.TH,+    conT, appT+  ) where++#if __GLASGOW_HASKELL__ < 710+import LLVM.General.Prelude+#endif++import qualified Language.Haskell.TH as TH (conT, appT)+import Language.Haskell.TH hiding (conT, appT)++class Typish qt where+  appT :: qt -> Q Type -> qt+  conT :: Name -> qt++instance Typish (Q Type) where+  appT = TH.appT+  conT = TH.conT++#if __GLASGOW_HASKELL__ < 710+instance Typish (Q Pred) where+  appT qp qt = do+    ClassP n ts <- qp+    t <- qt+    return $ ClassP n (ts ++ [t])+  conT n = classP n []+#endif