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


-- | Fuseable type-class based generics
--   
--   Defining generics that can be used efficiently on heterogenous data
--   structures like syntax trees. Can access elements of multiple types at
--   a single traversal. Non-invasive method don't have to change the
--   representation to use. All boilerplate code can be generated by the
--   supplied Template Haskell functions.
@package classyplate
@version 0.3.1.0

module Data.Generics.ClassyPlate.TypePrune

-- | This type decides if the subtree of an element cannot contain an
--   element that is transformed.

-- | Instantiate this type family to signal what elements does your
--   operation operate on. If <tt>AppSelector c t</tt> is True, there
--   should be a <tt>c t</tt> instance. AppSelector should be a total type
--   function for a given class, at least for all the types that can
--   possibly accessed.

-- | This type family sets which fields should not be traversed when trying
--   to generate automatically pruned versions of classy traversal.

module Data.Generics.ClassyPlate.Core

-- | A class for traversals that use a polymorphic function to visit all
--   applicable elements.
class GoodOperationFor c b => ClassyPlate c b

-- | A class for traversals that use a polymorphic function to visit all
--   applicable elements but only visit the parts where the applicable
--   elements could be found.
class (GoodOperationForAuto c b) => SmartClassyPlate c (sel :: Bool) b
bottomUp_ :: ClassyPlate c b => ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> a) -> b -> b
bottomUpM_ :: (ClassyPlate c b, Monad m) => ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> m a) -> b -> m b
smartTraverse_ :: SmartClassyPlate c sel b => FlagToken sel -> ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> a) -> b -> b
smartTraverseM_ :: (SmartClassyPlate c sel b, Monad m) => FlagToken sel -> ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> m a) -> b -> m b
descend_ :: ClassyPlate c b => ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> a) -> b -> b
descendM_ :: (ClassyPlate c b, Monad m) => ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> m a) -> b -> m b
topDown_ :: ClassyPlate c b => ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> a) -> b -> b
topDownM_ :: (ClassyPlate c b, Monad m) => ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> m a) -> b -> m b
app :: App flag c b => FlagToken flag -> ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> a) -> b -> b
appM :: (App flag c b, Monad m) => FlagToken flag -> ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> m a) -> b -> m b
appTD :: App flag c b => FlagToken flag -> ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> a) -> (b -> b) -> b -> b
appTDM :: (App flag c b, Monad m) => FlagToken flag -> ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> m a) -> (b -> m b) -> b -> m b
type GoodOperationFor c e = (App (AppSelector c e) c e)
type GoodOperationForAuto c e = (GoodOperationFor c e, Generic e)
data FlagToken (c :: Bool)
data ClsToken (c :: * -> Constraint)
instance Data.Generics.ClassyPlate.Core.GoodOperationForAuto c b => Data.Generics.ClassyPlate.Core.SmartClassyPlate c 'GHC.Types.True b
instance (Data.Generics.ClassyPlate.Core.ClassyPlate c b, c b) => Data.Generics.ClassyPlate.Core.App 'GHC.Types.True c b
instance Data.Generics.ClassyPlate.Core.App 'GHC.Types.False c b

module Data.Generics.ClassyPlate.TH
makeClassyPlate :: PrimitiveMarkers -> Name -> Q [Dec]

-- | Creates ClassyPlate instances for a datatype. Can specify which fields
--   should not be traversed.
makeClassyPlateConfig :: ClassyPlateConfig -> PrimitiveMarkers -> Name -> Q [Dec]
data ClassyPlateConfig
MakeAll :: ClassyPlateConfig
OnlyDirect :: ClassyPlateConfig

module Data.Generics.ClassyPlate.Generate
bottomUp_ :: ClassyPlate c b => ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> a) -> b -> b
bottomUpM_ :: (ClassyPlate c b, Monad m) => ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> m a) -> b -> m b
smartTraverse_ :: SmartClassyPlate c sel b => FlagToken sel -> ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> a) -> b -> b
smartTraverseM_ :: (SmartClassyPlate c sel b, Monad m) => FlagToken sel -> ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> m a) -> b -> m b
descend_ :: ClassyPlate c b => ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> a) -> b -> b
descendM_ :: (ClassyPlate c b, Monad m) => ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> m a) -> b -> m b
topDown_ :: ClassyPlate c b => ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> a) -> b -> b
topDownM_ :: (ClassyPlate c b, Monad m) => ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> m a) -> b -> m b
app :: App flag c b => FlagToken flag -> ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> a) -> b -> b
appM :: (App flag c b, Monad m) => FlagToken flag -> ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> m a) -> b -> m b
appTD :: App flag c b => FlagToken flag -> ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> a) -> (b -> b) -> b -> b
appTDM :: (App flag c b, Monad m) => FlagToken flag -> ClsToken c -> (forall a. (ClassyPlate c a, c a) => a -> m a) -> (b -> m b) -> b -> m b
type GoodOperationFor c e = (App (AppSelector c e) c e)
type GoodOperationForAuto c e = (GoodOperationFor c e, Generic e)
data FlagToken (c :: Bool)


-- | Wrappers and common functionality for classyplates
module Data.Generics.ClassyPlate.Common

-- | A class for the simple case when the applied function is monomorphic.
class MonoMatch a b

-- | Apply a monomorphic function on a polymorphic data structure.
monoApp :: MonoMatch a b => (a -> a) -> b -> b

-- | Go down one level in the data structure and apply the given
--   polymorphic function
descend :: forall c b. ClassyPlate c b => (forall a. (ClassyPlate c a, c a) => a -> a) -> b -> b
descendM :: forall c b m. (ClassyPlate c b, Monad m) => (forall a. (ClassyPlate c a, c a) => a -> m a) -> b -> m b

-- | Traverse the data structure in a top-down fashion with a polymorphic
--   function.
topDown :: forall c b. ClassyPlate c b => (forall a. (ClassyPlate c a, c a) => a -> a) -> b -> b
topDownM :: forall c b m. (ClassyPlate c b, Monad m) => (forall a. (ClassyPlate c a, c a) => a -> m a) -> b -> m b

-- | Traverse the data structure with a polymorphic function.
bottomUp :: forall c b. ClassyPlate c b => (forall a. (ClassyPlate c a, c a) => a -> a) -> b -> b

-- | Traverse the data structure with a polymorphic monadic function.
bottomUpM :: forall c b m. (ClassyPlate c b, Monad m) => (forall a. (ClassyPlate c a, c a) => a -> m a) -> b -> m b

-- | Traverse the data structure selectively with a function specifying if
--   need to go down on the subtrees.
selectiveTraverse :: forall c b. ClassyPlate c b => (forall a. (ClassyPlate c a, c a) => a -> (a, Bool)) -> b -> b

-- | Traverse the data structure selectively with a monadic function
--   specifying if need to go down on the subtrees.
selectiveTraverseM :: forall c b m. (Monad m, ClassyPlate c b) => (forall a. (ClassyPlate c a, c a) => a -> m (a, Bool)) -> b -> m b

-- | Traverse only those parts of the data structure that could possibly
--   contain elements that the given function can be applied on
smartTraverse :: forall c b. SmartClassyPlate c (ClassIgnoresSubtree c b) b => (forall a. (ClassyPlate c a, c a) => a -> a) -> b -> b

-- | Traverse only those parts of the data structure that could possibly
--   contain elements that the given monadic function can be applied on
smartTraverseM :: forall c b m. (SmartClassyPlate c (ClassIgnoresSubtree c b) b, Monad m) => (forall a. (ClassyPlate c a, c a) => a -> m a) -> b -> m b
instance Data.Generics.ClassyPlate.Common.MonoMatch a a

module Data.Generics.ClassyPlate

-- | A class for traversals that use a polymorphic function to visit all
--   applicable elements.
class GoodOperationFor c b => ClassyPlate c b

-- | A class for traversals that use a polymorphic function to visit all
--   applicable elements but only visit the parts where the applicable
--   elements could be found.
class (GoodOperationForAuto c b) => SmartClassyPlate c (sel :: Bool) b
