packages feed

generic-deriving 1.10.4 → 1.10.4.1

raw patch · 9 files changed

+127/−129 lines, 9 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,6 @@+# 1.10.4.1+* Fix Haddock parsing issue on GHC 8.0+ # 1.10.4 * Backported `MonadPlus` and `MonadZip` instances for `U1`, and made the   `Functor`, `Foldable`, `Traversable`, `Alternative`, and `Monad` instances
generic-deriving.cabal view
@@ -1,5 +1,5 @@ name:                   generic-deriving-version:                1.10.4+version:                1.10.4.1 synopsis:               Generic programming library for generalised deriving. description: 
src/Generics/Deriving/ConNames.hs view
@@ -13,19 +13,17 @@ {-# LANGUAGE PolyKinds #-} #endif --------------------------------------------------------------------------------- |--- Module      :  Generics.Deriving.ConNames--- Copyright   :  (c) 2012 University of Oxford--- License     :  BSD3------ Maintainer  :  generics@haskell.org--- Stability   :  experimental--- Portability :  non-portable------ Summary: Return the name of all the constructors of a type.---------------------------------------------------------------------------------+{- |+Module      :  Generics.Deriving.ConNames+Copyright   :  (c) 2012 University of Oxford+License     :  BSD3++Maintainer  :  generics@haskell.org+Stability   :  experimental+Portability :  non-portable++Summary: Return the name of all the constructors of a type.+-}  module Generics.Deriving.ConNames ( 
src/Generics/Deriving/Monoid.hs view
@@ -12,17 +12,18 @@ {-# LANGUAGE PolyKinds #-} #endif --- | This module provides two main features:------     1. 'GMonoid', a generic version of the 'Monoid' type class, including instances---     of the types from "Data.Monoid"------     2. Default generic definitions for the 'Monoid' methods 'mempty' and 'mappend'------ The generic defaults only work for types without alternatives (i.e. they have--- only one constructor). We cannot in general know how to deal with different--- constructors.+{- | This module provides two main features: +    1. 'GMonoid', a generic version of the 'Monoid' type class, including instances+    of the types from "Data.Monoid"++    2. Default generic definitions for the 'Monoid' methods 'mempty' and 'mappend'++The generic defaults only work for types without alternatives (i.e. they have+only one constructor). We cannot in general know how to deal with different+constructors.+-}+ module Generics.Deriving.Monoid (    -- * GMonoid type class@@ -34,20 +35,21 @@   gmappenddefault,    -- ** Monoid-  -- | These functions can be used in a 'Monoid' instance. For example:-  ---  -- @-  -- -- LANGUAGE DeriveGeneric-  ---  -- import Generics.Deriving.Base (Generic)-  -- import Generics.Deriving.Monoid-  ---  -- data T a = C a (Maybe a) deriving Generic-  ---  -- instance Monoid a => Monoid (T a) where-  --   mempty  = memptydefault-  --   mappend = mappenddefault-  -- @+  {- | These functions can be used in a 'Monoid' instance. For example:++  @+  -- LANGUAGE DeriveGeneric++  import Generics.Deriving.Base (Generic)+  import Generics.Deriving.Monoid++  data T a = C a (Maybe a) deriving Generic++  instance Monoid a => Monoid (T a) where+    mempty  = memptydefault+    mappend = mappenddefault+  @+  -}   memptydefault,   mappenddefault, 
src/Generics/Deriving/TH.hs view
@@ -1,46 +1,45 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} --------------------------------------------------------------------------------- |--- Module      :  Generics.Deriving.TH--- Copyright   :  (c) 2008--2009 Universiteit Utrecht--- License     :  BSD3------ Maintainer  :  generics@haskell.org--- Stability   :  experimental--- Portability :  non-portable------ This module contains Template Haskell code that can be used to--- automatically generate the boilerplate code for the generic deriving--- library.------ To use these functions, pass the name of a data type as an argument:------ @--- {-# LANGUAGE TemplateHaskell #-}------ data Example a = Example Int Char a--- $('deriveAll0'     ''Example) -- Derives Generic instance--- $('deriveAll1'     ''Example) -- Derives Generic1 instance--- $('deriveAll0And1' ''Example) -- Derives Generic and Generic1 instances--- @------ On GHC 7.4 or later, this code can also be used with data families. To derive--- for a data family instance, pass the name of one of the instance's constructors:------ @--- {-# LANGUAGE FlexibleInstances, TemplateHaskell, TypeFamilies #-}------ data family Family a b--- newtype instance Family Char x = FamilyChar Char--- data    instance Family Bool x = FamilyTrue | FamilyFalse------ $('deriveAll0' 'FamilyChar) -- instance Generic (Family Char b) where ...--- $('deriveAll1' 'FamilyTrue) -- instance Generic1 (Family Bool) where ...--- -- Alternatively, one could type $(deriveAll1 'FamilyFalse)--- @------------------------------------------------------------------------------+{- |+Module      :  Generics.Deriving.TH+Copyright   :  (c) 2008--2009 Universiteit Utrecht+License     :  BSD3++Maintainer  :  generics@haskell.org+Stability   :  experimental+Portability :  non-portable++This module contains Template Haskell code that can be used to+automatically generate the boilerplate code for the generic deriving+library.++To use these functions, pass the name of a data type as an argument:++@+{-# LANGUAGE TemplateHaskell #-}++data Example a = Example Int Char a+$('deriveAll0'     ''Example) -- Derives Generic instance+$('deriveAll1'     ''Example) -- Derives Generic1 instance+$('deriveAll0And1' ''Example) -- Derives Generic and Generic1 instances+@++On GHC 7.4 or later, this code can also be used with data families. To derive+for a data family instance, pass the name of one of the instance's constructors:++@+{-# LANGUAGE FlexibleInstances, TemplateHaskell, TypeFamilies #-}++data family Family a b+newtype instance Family Char x = FamilyChar Char+data    instance Family Bool x = FamilyTrue | FamilyFalse++$('deriveAll0' 'FamilyChar) -- instance Generic (Family Char b) where ...+$('deriveAll1' 'FamilyTrue) -- instance Generic1 (Family Bool) where ...+-- Alternatively, one could type $(deriveAll1 'FamilyFalse)+@+-}  -- Adapted from Generics.Regular.TH module Generics.Deriving.TH (
src/Generics/Deriving/TH/Internal.hs view
@@ -1,17 +1,16 @@ {-# LANGUAGE CPP #-} --------------------------------------------------------------------------------- |--- Module      :  Generics.Deriving.TH.Internal--- Copyright   :  (c) 2008--2009 Universiteit Utrecht--- License     :  BSD3------ Maintainer  :  generics@haskell.org--- Stability   :  experimental--- Portability :  non-portable------ Template Haskell-related utilities.------------------------------------------------------------------------------+{- |+Module      :  Generics.Deriving.TH.Internal+Copyright   :  (c) 2008--2009 Universiteit Utrecht+License     :  BSD3++Maintainer  :  generics@haskell.org+Stability   :  experimental+Portability :  non-portable++Template Haskell-related utilities.+-}  module Generics.Deriving.TH.Internal where 
src/Generics/Deriving/TH/Post711.hs view
@@ -1,16 +1,15 @@--------------------------------------------------------------------------------- |--- Module      :  Generics.Deriving.TH.Post711--- Copyright   :  (c) 2008--2009 Universiteit Utrecht--- License     :  BSD3------ Maintainer  :  generics@haskell.org--- Stability   :  experimental--- Portability :  non-portable------ Template Haskell machinery for the type-literal-based variant of GHC--- generics introduced in GHC 7.11.------------------------------------------------------------------------------+{- |+Module      :  Generics.Deriving.TH.Post711+Copyright   :  (c) 2008--2009 Universiteit Utrecht+License     :  BSD3++Maintainer  :  generics@haskell.org+Stability   :  experimental+Portability :  non-portable++Template Haskell machinery for the type-literal-based variant of GHC+generics introduced in GHC 7.11.+-}  module Generics.Deriving.TH.Post711 (       deriveMeta
src/Generics/Deriving/TH/Pre711.hs view
@@ -1,18 +1,17 @@ {-# LANGUAGE CPP #-} --------------------------------------------------------------------------------- |--- Module      :  Generics.Deriving.TH.Pre711--- Copyright   :  (c) 2008--2009 Universiteit Utrecht--- License     :  BSD3------ Maintainer  :  generics@haskell.org--- Stability   :  experimental--- Portability :  non-portable------ Template Haskell machinery for the proxy datatype variant of GHC generics--- used up until GHC 7.11.------------------------------------------------------------------------------+{- |+Module      :  Generics.Deriving.TH.Pre711+Copyright   :  (c) 2008--2009 Universiteit Utrecht+License     :  BSD3++Maintainer  :  generics@haskell.org+Stability   :  experimental+Portability :  non-portable++Template Haskell machinery for the proxy datatype variant of GHC generics+used up until GHC 7.11.+-}  module Generics.Deriving.TH.Pre711 (       deriveMeta
src/Generics/Deriving/Uniplate.hs view
@@ -18,19 +18,18 @@ {-# LANGUAGE OverlappingInstances #-} #endif ------------------------------------------------------------------------------------ |--- Module      :  Generics.Deriving.Uniplate--- Copyright   :  2011-2012 Universiteit Utrecht, University of Oxford--- License     :  BSD3------ Maintainer  :  generics@haskell.org--- Stability   :  experimental--- Portability :  non-portable------ Summary: Functions inspired by the Uniplate generic programming library,--- mostly implemented by Sean Leather.---------------------------------------------------------------------------------+{- |+Module      :  Generics.Deriving.Uniplate+Copyright   :  2011-2012 Universiteit Utrecht, University of Oxford+License     :  BSD3++Maintainer  :  generics@haskell.org+Stability   :  experimental+Portability :  non-portable++Summary: Functions inspired by the Uniplate generic programming library,+mostly implemented by Sean Leather.+-}  module Generics.Deriving.Uniplate (     Uniplate(..)