-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Generic programming library for generalised deriving.
--   
--   This package provides functionality for generalising the deriving
--   mechanism in Haskell to arbitrary classes. It was first described in
--   the paper:
--   
--   <ul>
--   <li><i>A generic deriving mechanism for Haskell</i>. Jose Pedro
--   Magalhaes, Atze Dijkstra, Johan Jeuring, and Andres Loeh.
--   Haskell'10.</li>
--   </ul>
--   
--   The current implementation integrates with the new GHC Generics. See
--   <a>http://www.haskell.org/haskellwiki/GHC.Generics</a> for more
--   information. Template Haskell code is provided for supporting GHC
--   before version 7.2.
@package generic-deriving
@version 1.8.0

module Generics.Deriving.Instances

module Generics.Deriving.Base

module Generics.Deriving.Copoint
class GCopoint d where gcopoint = gcopointdefault
gcopoint :: GCopoint d => d a -> a
gcopointdefault :: (Generic1 d, GCopoint' (Rep1 d)) => d a -> a
instance Generics.Deriving.Copoint.GCopoint' GHC.Generics.U1
instance Generics.Deriving.Copoint.GCopoint' GHC.Generics.Par1
instance Generics.Deriving.Copoint.GCopoint' (GHC.Generics.K1 i c)
instance Generics.Deriving.Copoint.GCopoint' f => Generics.Deriving.Copoint.GCopoint' (GHC.Generics.M1 i c f)
instance (Generics.Deriving.Copoint.GCopoint' f, Generics.Deriving.Copoint.GCopoint' g) => Generics.Deriving.Copoint.GCopoint' (f GHC.Generics.:+: g)
instance (Generics.Deriving.Copoint.GCopoint' f, Generics.Deriving.Copoint.GCopoint' g) => Generics.Deriving.Copoint.GCopoint' (f GHC.Generics.:*: g)
instance Generics.Deriving.Copoint.GCopoint f => Generics.Deriving.Copoint.GCopoint' (GHC.Generics.Rec1 f)
instance (Generics.Deriving.Copoint.GCopoint f, Generics.Deriving.Copoint.GCopoint' g) => Generics.Deriving.Copoint.GCopoint' (f GHC.Generics.:.: g)


-- | Summary: Return the name of all the constructors of a type.
module Generics.Deriving.ConNames
class ConNames f
gconNames :: ConNames f => f a -> [String]
gconNameOf :: ConNames f => f a -> String

-- | Return the name of all the constructors of the type of the given term.
conNames :: (Generic a, ConNames (Rep a)) => a -> [String]

-- | Return the name of the constructor of the given term
conNameOf :: (ConNames (Rep a), Generic a) => a -> String
instance (Generics.Deriving.ConNames.ConNames f, Generics.Deriving.ConNames.ConNames g) => Generics.Deriving.ConNames.ConNames (f GHC.Generics.:+: g)
instance Generics.Deriving.ConNames.ConNames f => Generics.Deriving.ConNames.ConNames (GHC.Generics.D1 c f)
instance GHC.Generics.Constructor c => Generics.Deriving.ConNames.ConNames (GHC.Generics.C1 c f)

module Generics.Deriving.Eq
class GEq a where geq x y = geq' (from x) (from y)
geq :: GEq a => a -> a -> Bool
instance Generics.Deriving.Eq.GEq' GHC.Generics.U1
instance Generics.Deriving.Eq.GEq c => Generics.Deriving.Eq.GEq' (GHC.Generics.K1 i c)
instance Generics.Deriving.Eq.GEq' a => Generics.Deriving.Eq.GEq' (GHC.Generics.M1 i c a)
instance (Generics.Deriving.Eq.GEq' a, Generics.Deriving.Eq.GEq' b) => Generics.Deriving.Eq.GEq' (a GHC.Generics.:+: b)
instance (Generics.Deriving.Eq.GEq' a, Generics.Deriving.Eq.GEq' b) => Generics.Deriving.Eq.GEq' (a GHC.Generics.:*: b)
instance Generics.Deriving.Eq.GEq GHC.Types.Char
instance Generics.Deriving.Eq.GEq GHC.Types.Int
instance Generics.Deriving.Eq.GEq GHC.Types.Float
instance Generics.Deriving.Eq.GEq a => Generics.Deriving.Eq.GEq (GHC.Base.Maybe a)
instance Generics.Deriving.Eq.GEq a => Generics.Deriving.Eq.GEq [a]

module Generics.Deriving.Enum
class GEnum a where genum = genumDefault
genum :: GEnum a => [a]
genumDefault :: (Generic a, Enum' (Rep a)) => [a]
toEnumDefault :: (Generic a, Enum' (Rep a)) => Int -> a
fromEnumDefault :: (GEq a, Generic a, Enum' (Rep a)) => a -> Int
class (Ord a) => GIx a where range = rangeDefault index = indexDefault inRange = inRangeDefault

-- | The list of values in the subrange defined by a bounding pair.
range :: GIx a => (a, a) -> [a]

-- | The position of a subscript in the subrange.
index :: GIx a => (a, a) -> a -> Int

-- | Returns <a>True</a> the given subscript lies in the range defined the
--   bounding pair.
inRange :: GIx a => (a, a) -> a -> Bool
rangeDefault :: (GEq a, Generic a, Enum' (Rep a)) => (a, a) -> [a]
indexDefault :: (GEq a, Generic a, Enum' (Rep a)) => (a, a) -> a -> Int
inRangeDefault :: (GEq a, Generic a, Enum' (Rep a)) => (a, a) -> a -> Bool
instance Generics.Deriving.Enum.Enum' GHC.Generics.U1
instance Generics.Deriving.Enum.GEnum c => Generics.Deriving.Enum.Enum' (GHC.Generics.K1 i c)
instance Generics.Deriving.Enum.Enum' f => Generics.Deriving.Enum.Enum' (GHC.Generics.M1 i c f)
instance (Generics.Deriving.Enum.Enum' f, Generics.Deriving.Enum.Enum' g) => Generics.Deriving.Enum.Enum' (f GHC.Generics.:+: g)
instance (Generics.Deriving.Enum.Enum' f, Generics.Deriving.Enum.Enum' g) => Generics.Deriving.Enum.Enum' (f GHC.Generics.:*: g)
instance Generics.Deriving.Enum.GEnum a => Generics.Deriving.Enum.GEnum (GHC.Base.Maybe a)
instance Generics.Deriving.Enum.GEnum a => Generics.Deriving.Enum.GEnum [a]
instance Generics.Deriving.Enum.GEnum GHC.Types.Int
instance (Generics.Deriving.Eq.GEq a, Generics.Deriving.Enum.GEnum a, Generics.Deriving.Enum.GIx a) => Generics.Deriving.Enum.GIx (GHC.Base.Maybe a)
instance (Generics.Deriving.Eq.GEq a, Generics.Deriving.Enum.GEnum a, Generics.Deriving.Enum.GIx a) => Generics.Deriving.Enum.GIx [a]
instance Generics.Deriving.Enum.GIx GHC.Types.Int

module Generics.Deriving.Functor
class GFunctor f where gmap = gmapdefault
gmap :: GFunctor f => (a -> b) -> f a -> f b
gmapdefault :: (Generic1 f, GFunctor' (Rep1 f)) => (a -> b) -> f a -> f b
instance Generics.Deriving.Functor.GFunctor' GHC.Generics.U1
instance Generics.Deriving.Functor.GFunctor' GHC.Generics.Par1
instance Generics.Deriving.Functor.GFunctor' (GHC.Generics.K1 i c)
instance Generics.Deriving.Functor.GFunctor f => Generics.Deriving.Functor.GFunctor' (GHC.Generics.Rec1 f)
instance Generics.Deriving.Functor.GFunctor' f => Generics.Deriving.Functor.GFunctor' (GHC.Generics.M1 i c f)
instance (Generics.Deriving.Functor.GFunctor' f, Generics.Deriving.Functor.GFunctor' g) => Generics.Deriving.Functor.GFunctor' (f GHC.Generics.:+: g)
instance (Generics.Deriving.Functor.GFunctor' f, Generics.Deriving.Functor.GFunctor' g) => Generics.Deriving.Functor.GFunctor' (f GHC.Generics.:*: g)
instance (Generics.Deriving.Functor.GFunctor f, Generics.Deriving.Functor.GFunctor' g) => Generics.Deriving.Functor.GFunctor' (f GHC.Generics.:.: g)
instance Generics.Deriving.Functor.GFunctor GHC.Base.Maybe
instance Generics.Deriving.Functor.GFunctor []

module Generics.Deriving.Show
class GShow a where gshows = gshowsPrec 0 gshow x = gshows x "" gshowsPrec = gshowsPrecdefault
gshowsPrec :: GShow a => Int -> a -> ShowS
gshows :: GShow a => a -> ShowS
gshow :: GShow a => a -> String
gshowsPrecdefault :: (Generic a, GShow' (Rep a)) => Int -> a -> ShowS
instance Generics.Deriving.Show.GShow' GHC.Generics.U1
instance Generics.Deriving.Show.GShow c => Generics.Deriving.Show.GShow' (GHC.Generics.K1 i c)
instance (Generics.Deriving.Show.GShow' a, GHC.Generics.Constructor c) => Generics.Deriving.Show.GShow' (GHC.Generics.M1 GHC.Generics.C c a)
instance (GHC.Generics.Selector s, Generics.Deriving.Show.GShow' a) => Generics.Deriving.Show.GShow' (GHC.Generics.M1 GHC.Generics.S s a)
instance Generics.Deriving.Show.GShow' a => Generics.Deriving.Show.GShow' (GHC.Generics.M1 GHC.Generics.D d a)
instance (Generics.Deriving.Show.GShow' a, Generics.Deriving.Show.GShow' b) => Generics.Deriving.Show.GShow' (a GHC.Generics.:+: b)
instance (Generics.Deriving.Show.GShow' a, Generics.Deriving.Show.GShow' b) => Generics.Deriving.Show.GShow' (a GHC.Generics.:*: b)
instance Generics.Deriving.Show.GShow a => Generics.Deriving.Show.GShow (GHC.Base.Maybe a)
instance Generics.Deriving.Show.GShow GHC.Types.Char
instance Generics.Deriving.Show.GShow GHC.Types.Int
instance Generics.Deriving.Show.GShow GHC.Types.Float
instance Generics.Deriving.Show.GShow GHC.Base.String
instance Generics.Deriving.Show.GShow GHC.Types.Bool
instance Generics.Deriving.Show.GShow a => Generics.Deriving.Show.GShow [a]


-- | Summary: Functions inspired by the Uniplate generic programming
--   library, mostly implemented by Sean Leather.
module Generics.Deriving.Uniplate
class Uniplate a where children = childrendefault context = contextdefault descend = descenddefault descendM = descendMdefault transform = transformdefault transformM = transformMdefault
children :: Uniplate a => a -> [a]
context :: Uniplate a => a -> [a] -> a
descend :: Uniplate a => (a -> a) -> a -> a
descendM :: (Uniplate a, Monad m) => (a -> m a) -> a -> m a
transform :: Uniplate a => (a -> a) -> a -> a
transformM :: (Uniplate a, Monad m) => (a -> m a) -> a -> m a
uniplate :: Uniplate a => a -> ([a], [a] -> a)
universe :: Uniplate a => a -> [a]
rewrite :: Uniplate a => (a -> Maybe a) -> a -> a
rewriteM :: (Monad m, Uniplate a) => (a -> m (Maybe a)) -> a -> m a
contexts :: Uniplate a => a -> [(a, a -> a)]
holes :: Uniplate a => a -> [(a, a -> a)]
para :: Uniplate a => (a -> [r] -> r) -> a -> r
childrendefault :: (Generic a, Uniplate' (Rep a) a) => a -> [a]
contextdefault :: (Generic a, Context' (Rep a) a) => a -> [a] -> a
descenddefault :: (Generic a, Uniplate' (Rep a) a) => (a -> a) -> a -> a
descendMdefault :: (Generic a, Uniplate' (Rep a) a, Monad m) => (a -> m a) -> a -> m a
transformdefault :: (Generic a, Uniplate' (Rep a) a) => (a -> a) -> a -> a
transformMdefault :: (Generic a, Uniplate' (Rep a) a, Monad m) => (a -> m a) -> a -> m a
instance Generics.Deriving.Uniplate.Uniplate' GHC.Generics.U1 a
instance Generics.Deriving.Uniplate.Uniplate a => Generics.Deriving.Uniplate.Uniplate' (GHC.Generics.K1 i a) a
instance Generics.Deriving.Uniplate.Uniplate' (GHC.Generics.K1 i a) b
instance Generics.Deriving.Uniplate.Uniplate' f b => Generics.Deriving.Uniplate.Uniplate' (GHC.Generics.M1 i c f) b
instance (Generics.Deriving.Uniplate.Uniplate' f b, Generics.Deriving.Uniplate.Uniplate' g b) => Generics.Deriving.Uniplate.Uniplate' (f GHC.Generics.:+: g) b
instance (Generics.Deriving.Uniplate.Uniplate' f b, Generics.Deriving.Uniplate.Uniplate' g b) => Generics.Deriving.Uniplate.Uniplate' (f GHC.Generics.:*: g) b
instance Generics.Deriving.Uniplate.Context' GHC.Generics.U1 b
instance Generics.Deriving.Uniplate.Context' (GHC.Generics.K1 i a) a
instance Generics.Deriving.Uniplate.Context' (GHC.Generics.K1 i a) b
instance Generics.Deriving.Uniplate.Context' f b => Generics.Deriving.Uniplate.Context' (GHC.Generics.M1 i c f) b
instance (Generics.Deriving.Uniplate.Context' f b, Generics.Deriving.Uniplate.Context' g b) => Generics.Deriving.Uniplate.Context' (f GHC.Generics.:+: g) b
instance Generics.Deriving.Uniplate.Context' g a => Generics.Deriving.Uniplate.Context' (GHC.Generics.M1 i c (GHC.Generics.K1 j a) GHC.Generics.:*: g) a
instance Generics.Deriving.Uniplate.Context' g b => Generics.Deriving.Uniplate.Context' (f GHC.Generics.:*: g) b
instance Generics.Deriving.Uniplate.Uniplate GHC.Types.Bool
instance Generics.Deriving.Uniplate.Uniplate GHC.Types.Char
instance Generics.Deriving.Uniplate.Uniplate GHC.Types.Double
instance Generics.Deriving.Uniplate.Uniplate GHC.Types.Float
instance Generics.Deriving.Uniplate.Uniplate GHC.Types.Int
instance Generics.Deriving.Uniplate.Uniplate ()
instance Generics.Deriving.Uniplate.Uniplate (b, c)
instance Generics.Deriving.Uniplate.Uniplate (b, c, d)
instance Generics.Deriving.Uniplate.Uniplate (b, c, d, e)
instance Generics.Deriving.Uniplate.Uniplate (b, c, d, e, f)
instance Generics.Deriving.Uniplate.Uniplate (b, c, d, e, f, g)
instance Generics.Deriving.Uniplate.Uniplate (b, c, d, e, f, g, h)
instance Generics.Deriving.Uniplate.Uniplate (GHC.Base.Maybe a)
instance Generics.Deriving.Uniplate.Uniplate (Data.Either.Either a b)
instance Generics.Deriving.Uniplate.Uniplate [a]

module Generics.Deriving.Foldable
class GFoldable t where gfoldMap = gfoldMapdefault gfold = gfoldMap id gfoldr f z t = appEndo (gfoldMap (Endo . f) t) z gfoldr' f z0 xs = gfoldl f' id xs z0 where f' k x z = k $! f x z gfoldl f z t = appEndo (getDual (gfoldMap (Dual . Endo . flip f) t)) z gfoldl' f z0 xs = gfoldr f' id xs z0 where f' x k z = k $! f z x gfoldr1 f xs = fromMaybe (error "gfoldr1: empty structure") (gfoldr mf Nothing xs) where mf x Nothing = Just x mf x (Just y) = Just (f x y) gfoldl1 f xs = fromMaybe (error "foldl1: empty structure") (gfoldl mf Nothing xs) where mf Nothing y = Just y mf (Just x) y = Just (f x y)
gfoldMap :: (GFoldable t, Monoid m) => (a -> m) -> t a -> m
gfold :: (GFoldable t, Monoid m) => t m -> m
gfoldr :: GFoldable t => (a -> b -> b) -> b -> t a -> b
gfoldr' :: GFoldable t => (a -> b -> b) -> b -> t a -> b
gfoldl :: GFoldable t => (a -> b -> a) -> a -> t b -> a
gfoldl' :: GFoldable t => (a -> b -> a) -> a -> t b -> a
gfoldr1 :: GFoldable t => (a -> a -> a) -> t a -> a
gfoldl1 :: GFoldable t => (a -> a -> a) -> t a -> a
gfoldMapdefault :: (Generic1 t, GFoldable' (Rep1 t), Monoid m) => (a -> m) -> t a -> m
gtoList :: GFoldable t => t a -> [a]
gconcat :: GFoldable t => t [a] -> [a]
gconcatMap :: GFoldable t => (a -> [b]) -> t a -> [b]
gand :: GFoldable t => t Bool -> Bool
gor :: GFoldable t => t Bool -> Bool
gany :: GFoldable t => (a -> Bool) -> t a -> Bool
gall :: GFoldable t => (a -> Bool) -> t a -> Bool
gsum :: (GFoldable t, Num a) => t a -> a
gproduct :: (GFoldable t, Num a) => t a -> a
gmaximum :: (GFoldable t, Ord a) => t a -> a
gmaximumBy :: GFoldable t => (a -> a -> Ordering) -> t a -> a
gminimum :: (GFoldable t, Ord a) => t a -> a
gminimumBy :: GFoldable t => (a -> a -> Ordering) -> t a -> a
gelem :: (GFoldable t, Eq a) => a -> t a -> Bool
gnotElem :: (GFoldable t, Eq a) => a -> t a -> Bool
gfind :: GFoldable t => (a -> Bool) -> t a -> Maybe a
instance Generics.Deriving.Foldable.GFoldable' GHC.Generics.U1
instance Generics.Deriving.Foldable.GFoldable' GHC.Generics.Par1
instance Generics.Deriving.Foldable.GFoldable' (GHC.Generics.K1 i c)
instance Generics.Deriving.Foldable.GFoldable f => Generics.Deriving.Foldable.GFoldable' (GHC.Generics.Rec1 f)
instance Generics.Deriving.Foldable.GFoldable' f => Generics.Deriving.Foldable.GFoldable' (GHC.Generics.M1 i c f)
instance (Generics.Deriving.Foldable.GFoldable' f, Generics.Deriving.Foldable.GFoldable' g) => Generics.Deriving.Foldable.GFoldable' (f GHC.Generics.:+: g)
instance (Generics.Deriving.Foldable.GFoldable' f, Generics.Deriving.Foldable.GFoldable' g) => Generics.Deriving.Foldable.GFoldable' (f GHC.Generics.:*: g)
instance (Generics.Deriving.Foldable.GFoldable f, Generics.Deriving.Foldable.GFoldable' g) => Generics.Deriving.Foldable.GFoldable' (f GHC.Generics.:.: g)
instance Generics.Deriving.Foldable.GFoldable GHC.Base.Maybe
instance Generics.Deriving.Foldable.GFoldable []


-- | This module provides two main features:
--   
--   <ol>
--   <li><a>GMonoid</a>, a generic version of the <a>Monoid</a> type class,
--   including instances of the types from <a>Data.Monoid</a></li>
--   <li>Default generic definitions for the <a>Monoid</a> methods
--   <a>mempty</a> and <a>mappend</a></li>
--   </ol>
--   
--   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
class GMonoid a where gmconcat = foldr gmappend gmempty gmempty = to gmempty' gmappend x y = to (gmappend' (from x) (from y))

-- | Generic <a>mempty</a>
gmempty :: GMonoid a => a

-- | Generic <a>mappend</a>
gmappend :: GMonoid a => a -> a -> a

-- | Generic <a>mconcat</a>
gmconcat :: GMonoid a => [a] -> a
gmemptydefault :: (Generic a, GMonoid' (Rep a)) => a
gmappenddefault :: (Generic a, GMonoid' (Rep a)) => a -> a -> a
memptydefault :: (Generic a, Monoid' (Rep a)) => a
mappenddefault :: (Generic a, Monoid' (Rep a)) => a -> a -> a
instance Generics.Deriving.Monoid.GMonoid' GHC.Generics.U1
instance Generics.Deriving.Monoid.GMonoid a => Generics.Deriving.Monoid.GMonoid' (GHC.Generics.K1 i a)
instance Generics.Deriving.Monoid.GMonoid' f => Generics.Deriving.Monoid.GMonoid' (GHC.Generics.M1 i c f)
instance (Generics.Deriving.Monoid.GMonoid' f, Generics.Deriving.Monoid.GMonoid' h) => Generics.Deriving.Monoid.GMonoid' (f GHC.Generics.:*: h)
instance Generics.Deriving.Monoid.Monoid' GHC.Generics.U1
instance GHC.Base.Monoid a => Generics.Deriving.Monoid.Monoid' (GHC.Generics.K1 i a)
instance Generics.Deriving.Monoid.Monoid' f => Generics.Deriving.Monoid.Monoid' (GHC.Generics.M1 i c f)
instance (Generics.Deriving.Monoid.Monoid' f, Generics.Deriving.Monoid.Monoid' h) => Generics.Deriving.Monoid.Monoid' (f GHC.Generics.:*: h)
instance Generics.Deriving.Monoid.GMonoid GHC.Types.Ordering
instance Generics.Deriving.Monoid.GMonoid ()
instance Generics.Deriving.Monoid.GMonoid Data.Monoid.Any
instance Generics.Deriving.Monoid.GMonoid Data.Monoid.All
instance Generics.Deriving.Monoid.GMonoid (Data.Monoid.First a)
instance Generics.Deriving.Monoid.GMonoid (Data.Monoid.Last a)
instance GHC.Num.Num a => Generics.Deriving.Monoid.GMonoid (Data.Monoid.Sum a)
instance GHC.Num.Num a => Generics.Deriving.Monoid.GMonoid (Data.Monoid.Product a)
instance Generics.Deriving.Monoid.GMonoid [a]
instance Generics.Deriving.Monoid.GMonoid (Data.Monoid.Endo a)
instance Generics.Deriving.Monoid.GMonoid a => Generics.Deriving.Monoid.GMonoid (Data.Monoid.Dual a)
instance Generics.Deriving.Monoid.GMonoid a => Generics.Deriving.Monoid.GMonoid (GHC.Base.Maybe a)
instance Generics.Deriving.Monoid.GMonoid b => Generics.Deriving.Monoid.GMonoid (a -> b)
instance (Generics.Deriving.Monoid.GMonoid a, Generics.Deriving.Monoid.GMonoid b) => Generics.Deriving.Monoid.GMonoid (a, b)
instance (Generics.Deriving.Monoid.GMonoid a, Generics.Deriving.Monoid.GMonoid b, Generics.Deriving.Monoid.GMonoid c) => Generics.Deriving.Monoid.GMonoid (a, b, c)
instance (Generics.Deriving.Monoid.GMonoid a, Generics.Deriving.Monoid.GMonoid b, Generics.Deriving.Monoid.GMonoid c, Generics.Deriving.Monoid.GMonoid d) => Generics.Deriving.Monoid.GMonoid (a, b, c, d)
instance (Generics.Deriving.Monoid.GMonoid a, Generics.Deriving.Monoid.GMonoid b, Generics.Deriving.Monoid.GMonoid c, Generics.Deriving.Monoid.GMonoid d, Generics.Deriving.Monoid.GMonoid e) => Generics.Deriving.Monoid.GMonoid (a, b, c, d, e)
instance (Generics.Deriving.Monoid.GMonoid a, Generics.Deriving.Monoid.GMonoid b, Generics.Deriving.Monoid.GMonoid c, Generics.Deriving.Monoid.GMonoid d, Generics.Deriving.Monoid.GMonoid e, Generics.Deriving.Monoid.GMonoid f) => Generics.Deriving.Monoid.GMonoid (a, b, c, d, e, f)
instance (Generics.Deriving.Monoid.GMonoid a, Generics.Deriving.Monoid.GMonoid b, Generics.Deriving.Monoid.GMonoid c, Generics.Deriving.Monoid.GMonoid d, Generics.Deriving.Monoid.GMonoid e, Generics.Deriving.Monoid.GMonoid f, Generics.Deriving.Monoid.GMonoid g) => Generics.Deriving.Monoid.GMonoid (a, b, c, d, e, f, g)
instance (Generics.Deriving.Monoid.GMonoid a, Generics.Deriving.Monoid.GMonoid b, Generics.Deriving.Monoid.GMonoid c, Generics.Deriving.Monoid.GMonoid d, Generics.Deriving.Monoid.GMonoid e, Generics.Deriving.Monoid.GMonoid f, Generics.Deriving.Monoid.GMonoid g, Generics.Deriving.Monoid.GMonoid h) => Generics.Deriving.Monoid.GMonoid (a, b, c, d, e, f, g, h)

module Generics.Deriving.Traversable
class (GFunctor t, GFoldable t) => GTraversable t where gtraverse = gtraversedefault gsequenceA = gtraverse id gmapM f = unwrapMonad . gtraverse (WrapMonad . f) gsequence = gmapM id
gtraverse :: (GTraversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
gsequenceA :: (GTraversable t, Applicative f) => t (f a) -> f (t a)
gmapM :: (GTraversable t, Monad m) => (a -> m b) -> t a -> m (t b)
gsequence :: (GTraversable t, Monad m) => t (m a) -> m (t a)
gtraversedefault :: (Generic1 t, GTraversable' (Rep1 t), Applicative f) => (a -> f b) -> t a -> f (t b)
instance Generics.Deriving.Traversable.GTraversable' GHC.Generics.U1
instance Generics.Deriving.Traversable.GTraversable' GHC.Generics.Par1
instance Generics.Deriving.Traversable.GTraversable' (GHC.Generics.K1 i c)
instance Generics.Deriving.Traversable.GTraversable f => Generics.Deriving.Traversable.GTraversable' (GHC.Generics.Rec1 f)
instance Generics.Deriving.Traversable.GTraversable' f => Generics.Deriving.Traversable.GTraversable' (GHC.Generics.M1 i c f)
instance (Generics.Deriving.Traversable.GTraversable' f, Generics.Deriving.Traversable.GTraversable' g) => Generics.Deriving.Traversable.GTraversable' (f GHC.Generics.:+: g)
instance (Generics.Deriving.Traversable.GTraversable' f, Generics.Deriving.Traversable.GTraversable' g) => Generics.Deriving.Traversable.GTraversable' (f GHC.Generics.:*: g)
instance (Generics.Deriving.Traversable.GTraversable f, Generics.Deriving.Traversable.GTraversable' g) => Generics.Deriving.Traversable.GTraversable' (f GHC.Generics.:.: g)
instance Generics.Deriving.Traversable.GTraversable GHC.Base.Maybe
instance Generics.Deriving.Traversable.GTraversable []


-- | This module contains Template Haskell code that can be used to
--   automatically generate the boilerplate code for the generic deriving
--   library. For now, it generates only the <a>Generic</a> instance. Empty
--   datatypes are not yet supported.
module Generics.Deriving.TH

-- | Given the type and the name (as string) for the type to derive,
--   generate the <tt>Data</tt> instance, the <a>Constructor</a> instances,
--   and the <a>Selector</a> instances.
deriveMeta :: Name -> Q [Dec]

-- | Given a datatype name, derive a datatype and instance of class
--   <a>Datatype</a>.
deriveData :: Name -> Q [Dec]

-- | Given a datatype name, derive datatypes and instances of class
--   <a>Constructor</a>.
deriveConstructors :: Name -> Q [Dec]

-- | Given a datatype name, derive datatypes and instances of class
--   <a>Selector</a>.
deriveSelectors :: Name -> Q [Dec]

-- | Given the type and the name (as string) for the type to derive,
--   generate the <tt>Data</tt> instance, the <a>Constructor</a> instances,
--   the <a>Selector</a> instances, and the <tt>Representable0</tt>
--   instance.
deriveAll :: Name -> Q [Dec]

-- | Given the type and the name (as string) for the Representable0 type
--   synonym to derive, generate the <tt>Representable0</tt> instance.
deriveRepresentable0 :: Name -> Q [Dec]

-- | Derive only the <tt>Rep0</tt> type synonym. Not needed if
--   <a>deriveRepresentable0</a> is used.
deriveRep0 :: Name -> Q [Dec]

-- | Given the names of a generic class, a type to instantiate, a function
--   in the class and the default implementation, generates the code for a
--   basic generic instance.
simplInstance :: Name -> Name -> Name -> Name -> Q [Dec]
instance Language.Haskell.TH.Syntax.Lift GHC.Generics.Fixity
instance Language.Haskell.TH.Syntax.Lift GHC.Generics.Associativity

module Generics.Deriving
