packages feed

derive-topdown 0.0.2.1 → 0.0.2.2

raw patch · 3 files changed

+9/−5 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

README.md view
@@ -88,7 +88,7 @@ 	        = \ value_amQy 	        ... 	        ...-You can use this this function with [`derive`](http://hackage.haskell.org/package/derive) package.+You can use this this function with [`derive`](http://hackage.haskell.org/package/derive) package. However, it seems that this package is broken with GHC >= 802.  ### 4. Deriving the superclasses `Data.Derive.Superclass` provides `deriving_superclasses`, `strategy_deriving_superclasses` and newtype_deriving_superclasses, gnds can be used to derive class instance and its superclass instances. @@ -112,7 +112,7 @@   #### **NOTE**:  About deriving instances of Typeable-There is a bug with `isInstance` function when working with Typeable class. See [`ticket #11251`](https://ghc.haskell.org/trac/ghc/ticket/11251). So there might be problems if you really want to derive `Typeable` class. However, this bug should affect you too much here since GHC now has `AutoDeriveTypeable` extension, which means you should never derive `Typeable` manually.+There is a bug with `isInstance` function when working with Typeable class. See [`ticket #11251`](https://ghc.haskell.org/trac/ghc/ticket/11251). So there might be problems if you really want to derive `Typeable` class. However, this bug should not affect you too much here since GHC now has `AutoDeriveTypeable` extension, which means you should never derive `Typeable` manually.  #### **NOTE**: You cannot derive a type synonym. `derive-topdown` will not work with `-XTypeSynonymInstances` language extension. The top node in the data declaration tree has to be a data or newtype.
derive-topdown.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                derive-topdown-version:             0.0.2.1+version:             0.0.2.2 synopsis:            Help Haskellers derive class instances for composited data types. description:         This package will make it easier to derive class instance for complex composited data types by using Template Haskell. license:             BSD3
src/Data/Derive/Superclass.hs view
@@ -55,7 +55,7 @@ >    deriving newtype instance Fractional F32 >    deriving newtype instance Floating F32 -Some of these examples are from [#13668](https://ghc.haskell.org/trac/ghc/ticket/13668).+Some of these examples are from [#13368](https://ghc.haskell.org/trac/ghc/ticket/13368). -}  module Data.Derive.Superclass @@ -93,7 +93,11 @@  deriving_superclasses :: Name -> Name -> Q [Dec] deriving_superclasses cn tn = do-                            a <- evalStateT (deriving_superclasses' Nothing cn tn) []+                            a <- evalStateT (deriving_superclasses' +#if __GLASGOW_HASKELL__ >= 802+                                             Nothing +#endif                            +                                             cn tn) []                             return a  #if __GLASGOW_HASKELL__ >= 802