packages feed

gdiff-th 0.1.0.3 → 0.1.0.4

raw patch · 6 files changed

+56/−30 lines, 6 filesdep −hdis86dep −language-ecmascriptdep −lensdep ~containersdep ~template-haskellPVP ok

version bump matches the API change (PVP)

Dependencies removed: hdis86, language-ecmascript, lens, pointless-haskell

Dependency ranges changed: containers, template-haskell

API changes (from Hackage documentation)

Files

gdiff-th.cabal view
@@ -7,7 +7,7 @@ -- The package version. See the Haskell package versioning policy -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for -- standards guiding when and how versions should be incremented.-Version:             0.1.0.3+Version:             0.1.0.4  -- A short (one-line) description of the package. Synopsis:            Generate gdiff GADTs and Instances.@@ -24,7 +24,9 @@     I am not convinced there are no bugs in my code yet. There are examples in the @examples@ directory of the      cabal tarball. Also the main module includes an example in the documentation.     .    -    * New in this version: It's functional.+    * New in 0.1.0.0 : It's functional.+    .+    * New in 0.1.0.4 : Builds on GHC 7.6.1, 7.4.2, and 7.0.3  -- The license under which the package is released. License:             BSD3@@ -33,16 +35,16 @@ License-file:        LICENSE  -- The package author(s).--- Author:  Jonathan Fischoff            +Author:  Jonathan Fischoff              -- An email address to which users can send suggestions, bug reports, -- and patches. Maintainer:          jonathangfischoff@gmail.com  -- A copyright notice.--- Copyright: Copyright 2012 Jonathan Fischoff           +Copyright: (c) 2012 Jonathan Fischoff            -Category:            Generics+Category:            Generics, Testing  Build-type:          Simple     @@ -56,6 +58,11 @@ -- Constraint on the version of Cabal needed to build this package. Cabal-version:       >=1.8 +homepage:    https://github.com/jfischoff/gdiff-th+bug-reports: https://github.com/jfischoff/gdiff-th/issues+tested-with: GHC == 7.6.1++ source-repository head     type:     git     location: git://github.com/jfischoff/gdiff-th.git@@ -73,33 +80,28 @@      -- Packages needed in order to build this package.   Build-depends: base >= 4.0 && <= 6.0,-                 template-haskell == 2.8.*,                  gdiff == 1.0.*,                  th-expand-syns == 0.3.*,                  uniplate == 1.6.*,-                 lens == 3.0.*,-                 pointless-haskell == 0.0.*,-                 containers == 0.5.*,-                 mtl == 2.1.*,-                 th-expand-syns == 0.3.*-                 +                 containers,+                 mtl == 2.1.*+                    + if impl(ghc == 7.0.3)+    Build-depends: template-haskell < 2.6.0+ else+    Build-depends: template-haskell < 2.9.0+    ghc-options: -Wall                  -  ghc-options:            -Wall- Test-Suite tests     Hs-Source-Dirs: src, tests     type:       exitcode-stdio-1.0     main-is:    Main.hs     build-depends:   base >= 4.0 && <= 6.0,-                     template-haskell == 2.8.*,+                     template-haskell < 2.9.0,                      gdiff == 1.0.*,                      th-expand-syns == 0.3.*,                      uniplate == 1.6.*,-                     lens == 3.0.*,-                     pointless-haskell == 0.0.*,-                     containers == 0.5.*,-                     mtl == 2.1.*,-                     th-expand-syns == 0.3.*,-                     language-ecmascript == 0.*,-                     hdis86 == 0.*+                     containers,+                     mtl == 2.1.*+ 
src/Data/Generic/Diff/TH/Conversion.hs view
@@ -1,4 +1,5 @@-{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE TemplateHaskell, CPP #-}+{-# OPTIONS_GHC -pgmPcpphs  -optP--cpp #-} module Data.Generic.Diff.TH.Conversion where import Data.Generic.Diff.TH.Types import qualified Language.Haskell.TH as TH@@ -23,7 +24,9 @@     AppT a b        -> typToString a ++ typToString b     ConT n          -> prettifyName n     TupleT c        -> "Tuple" ++ show c+#if __GLASGOW_HASKELL__ > 700     UnboxedTupleT c -> "UnboxedTupleT" ++ show c+#endif     ListT           -> "List"     _               -> error $ "Unsupported type in " ++ show x 
src/Data/Generic/Diff/TH/Internal.hs view
@@ -1,5 +1,6 @@ {-#  LANGUAGE TemplateHaskell, QuasiQuotes, TupleSections, -    RecordWildCards, DeriveDataTypeable #-}+    RecordWildCards, DeriveDataTypeable, CPP #-}+{-# OPTIONS_GHC -pgmPcpphs  -optP--cpp #-}     module Data.Generic.Diff.TH.Internal where import Data.Generic.Diff.TH.Types import Language.Haskell.TH@@ -131,6 +132,11 @@  mkAllInstances :: [(Name, TH.Exp)] -> Fam -> Q [Dec] mkAllInstances prims x = liftM2 (:) (famInstance prims x) (familyTypeInstances x)++#if __GLASGOW_HASKELL__ < 706+forallC :: [TyVarBndr] -> CxtQ -> ConQ -> ConQ    +forallC ns ctxt con = liftM2 (ForallC ns) ctxt con+#endif  mkGADTConstructor :: Name -> Name -> TH.Type -> FamCon -> ConQ mkGADTConstructor a b typ (FamCon {..}) = case _famConHardness of
src/Data/Generic/Diff/TH/Specialize.hs view
@@ -1,11 +1,16 @@-{-# LANGUAGE TemplateHaskell, TupleSections #-}+{-# LANGUAGE TemplateHaskell, TupleSections, CPP #-}+{-# OPTIONS_GHC -pgmPcpphs  -optP--cpp #-} module Data.Generic.Diff.TH.Specialize where import Language.Haskell.TH import Data.Generics.Uniplate.Data (childrenBi, transformBi, transformBiM) import Data.Maybe (fromMaybe, maybeToList) import Control.Monad.Reader import Control.Monad.State+#if __GLASGOW_HASKELL__ < 704+import Control.Applicative ((<$>), Applicative(..))+#else import Control.Applicative ((<$>))+#endif import Data.List  (nub) import Language.Haskell.TH.Ppr (split) import Data.Traversable (traverse)@@ -17,6 +22,12 @@  type Context = StateT [([Type], Name)] Q +#if __GLASGOW_HASKELL__ < 704+instance Applicative Q where+    pure  = return+    (<*>) = ap +#endif+ --This is the main recursive function specializeChildDecs :: [Type] -> Name -> Context [(Type, Dec)] specializeChildDecs args n = do@@ -36,6 +47,8 @@             return $ (foldl AppT (ConT n) args, sdec) : children         Nothing  -> return [] ++ --Only look up the [Type] Name combos once --I also expand the type synonym here reifyDecOnce :: [Type]-> Name -> Context (Maybe Dec)@@ -92,7 +105,9 @@ getTypeName x = case x of         ConT n -> n         TupleT c          -> mkName $ "(" ++ replicate (c - 1) ',' ++ ")"+#if __GLASGOW_HASKELL__ > 700         UnboxedTupleT c   -> mkName $ "(" ++ replicate c ',' ++ ")"+#endif         ListT             -> ''[]         _ -> error $ show x ++ " is not a ConT" 
src/Data/Generic/Diff/TH/Types.hs view
@@ -1,6 +1,6 @@ {-#  LANGUAGE TemplateHaskell, DeriveDataTypeable #-} module Data.Generic.Diff.TH.Types where-import Control.Lens+--import Control.Lens import Data.Data import Language.Haskell.TH @@ -16,7 +16,7 @@     }     deriving(Data, Typeable, Show, Eq) -makeLenses ''FamCon+--makeLenses ''FamCon  data FamType = FamType {         _famTypeType         :: Type    ,@@ -24,7 +24,7 @@     }     deriving(Data, Typeable, Show, Eq) -makeLenses ''FamType+--makeLenses ''FamType  data Fam = Fam {         _famName  :: Name     ,@@ -32,4 +32,4 @@     }     deriving(Data, Typeable, Show, Eq) -makeLenses ''Fam+--makeLenses ''Fam
tests/Main.hs view
@@ -3,7 +3,7 @@ module Main where import Data.Generic.Diff.TH () import Data.Generic.Diff ()-import Instances ()+-- import Instances ()  -- great test huh? -- Mostly I am making sure it is able to build "something" on large