{-# LANGUAGE FunctionalDependencies #-}

module Language.Hasmtlib.Internal.Uniplate1 where

import Language.Hasmtlib.Internal.Constraint
import Data.Kind

type Uniplate1 :: (k -> Type) -> [k -> Constraint] -> Constraint
class Uniplate1 f cs | f -> cs where
  uniplate1 :: (Applicative m, AllC cs b) => (forall a. AllC cs a => f a -> m (f a)) -> f b -> m (f b)

transformM1 :: (Monad m, Uniplate1 f cs, AllC cs b) => (forall a. AllC cs a => f a -> m (f a)) -> f b -> m (f b)
transformM1 :: forall {k} (m :: * -> *) (f :: k -> *) (cs :: [k -> Constraint])
       (b :: k).
(Monad m, Uniplate1 f cs, AllC cs b) =>
(forall (a :: k). AllC cs a => f a -> m (f a)) -> f b -> m (f b)
transformM1 forall (a :: k). AllC cs a => f a -> m (f a)
f f b
x = (forall (a :: k). AllC cs a => f a -> m (f a)) -> f b -> m (f b)
forall k (f :: k -> *) (cs :: [k -> Constraint]) (m :: * -> *)
       (b :: k).
(Uniplate1 f cs, Applicative m, AllC cs b) =>
(forall (a :: k). AllC cs a => f a -> m (f a)) -> f b -> m (f b)
forall (m :: * -> *) (b :: k).
(Applicative m, AllC cs b) =>
(forall (a :: k). AllC cs a => f a -> m (f a)) -> f b -> m (f b)
uniplate1 ((forall (a :: k). AllC cs a => f a -> m (f a)) -> f a -> m (f a)
forall {k} (m :: * -> *) (f :: k -> *) (cs :: [k -> Constraint])
       (b :: k).
(Monad m, Uniplate1 f cs, AllC cs b) =>
(forall (a :: k). AllC cs a => f a -> m (f a)) -> f b -> m (f b)
transformM1 f a -> m (f a)
forall (a :: k). AllC cs a => f a -> m (f a)
f) f b
x m (f b) -> (f b -> m (f b)) -> m (f b)
forall a b. m a -> (a -> m b) -> m b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= f b -> m (f b)
forall (a :: k). AllC cs a => f a -> m (f a)
f

lazyParaM1 :: (Monad m, Uniplate1 f cs, AllC cs b) => (forall a. AllC cs a => f a -> m (f a) -> m (f a)) -> f b -> m (f b)
lazyParaM1 :: forall {k} (m :: * -> *) (f :: k -> *) (cs :: [k -> Constraint])
       (b :: k).
(Monad m, Uniplate1 f cs, AllC cs b) =>
(forall (a :: k). AllC cs a => f a -> m (f a) -> m (f a))
-> f b -> m (f b)
lazyParaM1 forall (a :: k). AllC cs a => f a -> m (f a) -> m (f a)
f f b
x = f b -> m (f b) -> m (f b)
forall (a :: k). AllC cs a => f a -> m (f a) -> m (f a)
f f b
x ((forall (a :: k). AllC cs a => f a -> m (f a)) -> f b -> m (f b)
forall k (f :: k -> *) (cs :: [k -> Constraint]) (m :: * -> *)
       (b :: k).
(Uniplate1 f cs, Applicative m, AllC cs b) =>
(forall (a :: k). AllC cs a => f a -> m (f a)) -> f b -> m (f b)
forall (m :: * -> *) (b :: k).
(Applicative m, AllC cs b) =>
(forall (a :: k). AllC cs a => f a -> m (f a)) -> f b -> m (f b)
uniplate1 ((forall (a :: k). AllC cs a => f a -> m (f a) -> m (f a))
-> f a -> m (f a)
forall {k} (m :: * -> *) (f :: k -> *) (cs :: [k -> Constraint])
       (b :: k).
(Monad m, Uniplate1 f cs, AllC cs b) =>
(forall (a :: k). AllC cs a => f a -> m (f a) -> m (f a))
-> f b -> m (f b)
lazyParaM1 f a -> m (f a) -> m (f a)
forall (a :: k). AllC cs a => f a -> m (f a) -> m (f a)
f) f b
x)