newtype-generics 0.5.4 → 0.6
raw patch · 4 files changed
+17/−29 lines, 4 filesdep ~base
Dependency ranges changed: base
Files
- CHANGELOG.md +6/−1
- Control/Newtype.hs +0/−6
- Control/Newtype/Generics.hs +4/−13
- newtype-generics.cabal +7/−9
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog for `newtype-generics` +## [0.6] – 2021-02-04+- Remove the deprecated `Control.Newtype` module.+- Support GHC-9.0+ ## [0.5.4] – 2019-09-10 - Add `Newtype` instance for `Data.Monoid.Ap`. - Support GHC-8.8.@@ -36,7 +40,8 @@ - Relax types of `underF` and `overF` to allow different input & output functors -[Unreleased]: https://github.com/sjakobi/newtype-generics/compare/v0.5.4...HEAD+[Unreleased]: https://github.com/sjakobi/newtype-generics/compare/v0.6...HEAD+[0.6]: https://github.com/sjakobi/newtype-generics/compare/v0.5.4...v0.6 [0.5.4]: https://github.com/sjakobi/newtype-generics/compare/v0.5.3...v0.5.4 [0.5.3]: https://github.com/sjakobi/newtype-generics/compare/v0.5.2.2...v0.5.3 [0.5.2.2]: https://github.com/sjakobi/newtype-generics/compare/v0.5.2.1...v0.5.2.2
− Control/Newtype.hs
@@ -1,6 +0,0 @@-module Control.Newtype-{-# deprecated "Import \"Control.Newtype.Generics\" instead" #-}- ( module Control.Newtype.Generics- ) where--import Control.Newtype.Generics
Control/Newtype/Generics.hs view
@@ -60,15 +60,12 @@ import Control.Arrow import Data.Functor.Compose import Data.Functor.Identity-#if MIN_VERSION_base(4,7,0) import Data.Fixed-#endif+import Data.Kind (Type) import Data.Monoid import Data.Ord-#if MIN_VERSION_base(4,9,0) import qualified Data.Semigroup import Data.Semigroup (Min(..), Max(..), WrappedMonoid(..), Option(..))-#endif import GHC.Generics {-import Generics.Deriving-} @@ -84,7 +81,7 @@ -- Generic Newtype class GNewtype n where- type GO n :: *+ type GO n :: Type gpack :: GO n -> n p gunpack :: n p -> GO n @@ -105,7 +102,7 @@ -- | As long as the type @n@ is an instance of Generic, you can create an instance -- with just @instance Newtype n@ class Newtype n where- type O n :: *+ type O n :: Type type O n = GO (Rep n) pack :: O n -> n@@ -240,7 +237,6 @@ pack = ArrowMonad unpack (ArrowMonad a) = a -#if MIN_VERSION_base(4,7,0) -- Instances from Data.Fixed -- | @since 0.5.1@@ -248,7 +244,6 @@ type O (Fixed a) = Integer pack = MkFixed unpack (MkFixed x) = x-#endif -- Instances from Data.Functor.Compose @@ -316,16 +311,14 @@ pack = Last unpack (Last a) = a -#if MIN_VERSION_base(4,8,0) -- | @since 0.5.1 instance Newtype (Alt f a) where type O (Alt f a) = f a pack = Alt unpack (Alt x) = x-#endif #if MIN_VERSION_base(4,12,0)--- | @since Unreleased+-- | @since 0.5.4 instance Newtype (Ap f a) where type O (Ap f a) = f a pack = Ap@@ -341,7 +334,6 @@ unpack (Down a) = a -#if MIN_VERSION_base(4,9,0) -- Instances from Data.Semigroup -- | @since 0.5.1@@ -379,4 +371,3 @@ type O (Option a) = Maybe a pack = Option unpack (Option x) = x-#endif
newtype-generics.cabal view
@@ -1,5 +1,5 @@ Name: newtype-generics-Version: 0.5.4+Version: 0.6 Synopsis: A typeclass and set of functions for working with newtypes Description: Per Conor McBride, the Newtype typeclass represents the packing and unpacking of a newtype, and allows you to operate under that newtype with functions such as ala.@@ -15,19 +15,17 @@ Extra-source-files: CHANGELOG.md Cabal-version: >=1.10 Tested-with:- GHC==8.8.1,+ -- GHC==9.0.1,+ GHC==8.10.3,+ GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2,- GHC==8.0.2,- GHC==7.10.3,- GHC==7.8.4,- GHC==7.6.3+ GHC==8.0.2 Library- Exposed-modules: Control.Newtype- , Control.Newtype.Generics- Build-depends: base >= 4.6 && < 4.14+ Exposed-modules: Control.Newtype.Generics+ Build-depends: base >= 4.9 && < 4.16 , transformers < 0.6 Ghc-options: -Wall default-language: Haskell2010