hedgehog-1.5: Release with confidence.

Safe Haskell | None
Language | Haskell2010

Hedgehog.Internal.Barbie

Description

For compatibility across different versions of the `barbie` package.

Synopsis

- class FunctorB (b :: (k -> Type) -> Type) where
  - bmap :: (forall (a :: k). f a -> g a) -> b f -> b g
- class FunctorB b => TraversableB (b :: (k -> Type) -> Type) where
  - btraverse :: Applicative e => (forall (a :: k). f a -> e (g a)) -> b f -> e (b g)
- newtype Rec p a (x :: k) = Rec {
  - unRec :: K1 R a x
  }

# Documentation

class FunctorB (b :: (k -> Type) -> Type) where Source #

Barbie-types that can be mapped over. Instances of `FunctorB` should satisfy the following laws:

    bmap id = id
    bmap f . bmap g = bmap (f . g)

There is a default `bmap` implementation for `Generic` types, so instances can derived automatically.

Minimal complete definition

Nothing

Methods

bmap :: (forall (a :: k). f a -> g a) -> b f -> b g Source #

default bmap :: forall f g. CanDeriveFunctorB b f g => (forall (a :: k). f a -> g a) -> b f -> b g Source #

#### Instances

Instances details

FunctorB (Var a :: (Type -> Type) -> Type) Source # |
Instance details Defined in Hedgehog.Internal.State Methods bmap :: (forall a0. f a0 -> g a0) -> Var a f -> Var a g Source #
FunctorB (Proxy :: (k -> Type) -> Type) |
Instance details Defined in Barbies.Internal.FunctorB Methods bmap :: (forall (a :: k). f a -> g a) -> Proxy f -> Proxy g Source #
FunctorB (Const x :: (k -> Type) -> Type) |
Instance details Defined in Barbies.Internal.FunctorB Methods bmap :: (forall (a :: k). f a -> g a) -> Const x f -> Const x g Source #
FunctorB (Constant x :: (k -> Type) -> Type) |
Instance details Defined in Barbies.Internal.FunctorB Methods bmap :: (forall (a :: k). f a -> g a) -> Constant x f -> Constant x g Source #
(FunctorB a, FunctorB b) => FunctorB (Product a b :: (k -> Type) -> Type) |
Instance details Defined in Barbies.Internal.FunctorB Methods bmap :: (forall (a0 :: k). f a0 -> g a0) -> Product a b f -> Product a b g Source #
(FunctorB a, FunctorB b) => FunctorB (Sum a b :: (k -> Type) -> Type) |
Instance details Defined in Barbies.Internal.FunctorB Methods bmap :: (forall (a0 :: k). f a0 -> g a0) -> Sum a b f -> Sum a b g Source #
(Functor f, FunctorB b) => FunctorB (Compose f b :: (k -> Type) -> Type) |
Instance details Defined in Barbies.Internal.FunctorB Methods bmap :: (forall (a :: k). f0 a -> g a) -> Compose f b f0 -> Compose f b g Source #
FunctorT b => FunctorB (Flip b f :: (k1 -> Type) -> Type) |
Instance details Defined in Barbies.Bi Methods bmap :: (forall (a :: k1). f0 a -> g a) -> Flip b f f0 -> Flip b f g Source #

class FunctorB b => TraversableB (b :: (k -> Type) -> Type) where Source #

Barbie-types that can be traversed from left to right. Instances should satisfy the following laws:

     t . btraverse f   = btraverse (t . f)  -- naturality
    btraverse Identity = Identity           -- identity
    btraverse (Compose . fmap g . f) = Compose . fmap (btraverse g) . btraverse f -- composition

There is a default `btraverse` implementation for `Generic` types, so instances can derived automatically.

Minimal complete definition

Nothing

Methods

btraverse :: Applicative e => (forall (a :: k). f a -> e (g a)) -> b f -> e (b g) Source #

default btraverse :: forall e f g. (Applicative e, CanDeriveTraversableB b f g) => (forall (a :: k). f a -> e (g a)) -> b f -> e (b g) Source #

#### Instances

Instances details

TraversableB (Var a :: (Type -> Type) -> Type) Source # |
Instance details Defined in Hedgehog.Internal.State Methods btraverse :: Applicative e => (forall a0. f a0 -> e (g a0)) -> Var a f -> e (Var a g) Source #
TraversableB (Proxy :: (k -> Type) -> Type) |
Instance details Defined in Barbies.Internal.TraversableB Methods btraverse :: Applicative e => (forall (a :: k). f a -> e (g a)) -> Proxy f -> e (Proxy g) Source #
TraversableB (Const a :: (k -> Type) -> Type) |
Instance details Defined in Barbies.Internal.TraversableB Methods btraverse :: Applicative e => (forall (a0 :: k). f a0 -> e (g a0)) -> Const a f -> e (Const a g) Source #
TraversableB (Constant a :: (k -> Type) -> Type) |
Instance details Defined in Barbies.Internal.TraversableB Methods btraverse :: Applicative e => (forall (a0 :: k). f a0 -> e (g a0)) -> Constant a f -> e (Constant a g) Source #
(TraversableB a, TraversableB b) => TraversableB (Product a b :: (k -> Type) -> Type) |
Instance details Defined in Barbies.Internal.TraversableB Methods btraverse :: Applicative e => (forall (a0 :: k). f a0 -> e (g a0)) -> Product a b f -> e (Product a b g) Source #
(TraversableB a, TraversableB b) => TraversableB (Sum a b :: (k -> Type) -> Type) |
Instance details Defined in Barbies.Internal.TraversableB Methods btraverse :: Applicative e => (forall (a0 :: k). f a0 -> e (g a0)) -> Sum a b f -> e (Sum a b g) Source #
(Traversable f, TraversableB b) => TraversableB (Compose f b :: (k -> Type) -> Type) |
Instance details Defined in Barbies.Internal.TraversableB Methods btraverse :: Applicative e => (forall (a :: k). f0 a -> e (g a)) -> Compose f b f0 -> e (Compose f b g) Source #
TraversableT b => TraversableB (Flip b f :: (k1 -> Type) -> Type) |
Instance details Defined in Barbies.Bi Methods btraverse :: Applicative e => (forall (a :: k1). f0 a -> e (g a)) -> Flip b f f0 -> e (Flip b f g) Source #

newtype Rec p a (x :: k) Source #

Constructors

Rec |

Fields

- unRec :: K1 R a x

#### Instances

Instances details

TraversableB b => GTraversable 0 (f :: k -> Type) (g :: k -> Type) (Rec (b (P 0 f)) (b f) :: k2 -> Type) (Rec (b (P 0 g)) (b g) :: k2 -> Type) |
Instance details Defined in Barbies.Internal.TraversableB Methods gtraverse :: forall t (x :: k2). Applicative t => Proxy 0 -> (forall (a :: k). f a -> t (g a)) -> Rec (b (P 0 f)) (b f) x -> t (Rec (b (P 0 g)) (b g) x) Source #
(Traversable h, TraversableB b) => GTraversable 0 (f :: k -> Type) (g :: k -> Type) (Rec (h (b (P 0 f))) (h (b f)) :: k2 -> Type) (Rec (h (b (P 0 g))) (h (b g)) :: k2 -> Type) |
Instance details Defined in Barbies.Internal.TraversableB Methods gtraverse :: forall t (x :: k2). Applicative t => Proxy 0 -> (forall (a :: k). f a -> t (g a)) -> Rec (h (b (P 0 f))) (h (b f)) x -> t (Rec (h (b (P 0 g))) (h (b g)) x) Source #
(Traversable h, Traversable m, TraversableB b) => GTraversable 0 (f :: k -> Type) (g :: k -> Type) (Rec (m (h (b (P 0 f)))) (m (h (b f))) :: k2 -> Type) (Rec (m (h (b (P 0 g)))) (m (h (b g))) :: k2 -> Type) |
Instance details Defined in Barbies.Internal.TraversableB Methods gtraverse :: forall t (x :: k2). Applicative t => Proxy 0 -> (forall (a :: k). f a -> t (g a)) -> Rec (m (h (b (P 0 f)))) (m (h (b f))) x -> t (Rec (m (h (b (P 0 g)))) (m (h (b g))) x) Source #
ApplicativeB b => GApplicative 0 (f :: k -> Type) (g :: k -> Type) (Rec (b (P 0 f)) (b f) :: k1 -> Type) (Rec (b (P 0 g)) (b g) :: k1 -> Type) (Rec (b (P 0 (Product f g))) (b (Product f g)) :: k1 -> Type) |

Instance details

Defined in Barbies.Internal.ApplicativeB

Methods

gprod :: forall (x :: k1). Proxy 0 -> Proxy f -> Proxy g -> Rec (b (P 0 f)) (b f) x -> Rec (b (P 0 g)) (b g) x -> Rec (b (P 0 (Product f g))) (b (Product f g)) x Source #

gpure :: forall (x :: k1). (f ~ g, (Rec (b (P 0 f)) (b f) :: k1 -> Type) ~ (Rec (b (P 0 g)) (b g) :: k1 -> Type)) => Proxy 0 -> Proxy f -> Proxy (Rec (b (P 0 f)) (b f) :: k1 -> Type) -> Proxy (Rec (b (P 0 (Product f g))) (b (Product f g)) :: k1 -> Type) -> (forall (a :: k). f a) -> Rec (b (P 0 f)) (b f) x Source #

(Applicative h, ApplicativeB b) => GApplicative 0 (f :: k -> Type) (g :: k -> Type) (Rec (h (b (P 0 f))) (h (b f)) :: k1 -> Type) (Rec (h (b (P 0 g))) (h (b g)) :: k1 -> Type) (Rec (h (b (P 0 (Product f g)))) (h (b (Product f g))) :: k1 -> Type) |

Instance details

Defined in Barbies.Internal.ApplicativeB

Methods

gprod :: forall (x :: k1). Proxy 0 -> Proxy f -> Proxy g -> Rec (h (b (P 0 f))) (h (b f)) x -> Rec (h (b (P 0 g))) (h (b g)) x -> Rec (h (b (P 0 (Product f g)))) (h (b (Product f g))) x Source #

gpure :: forall (x :: k1). (f ~ g, (Rec (h (b (P 0 f))) (h (b f)) :: k1 -> Type) ~ (Rec (h (b (P 0 g))) (h (b g)) :: k1 -> Type)) => Proxy 0 -> Proxy f -> Proxy (Rec (h (b (P 0 f))) (h (b f)) :: k1 -> Type) -> Proxy (Rec (h (b (P 0 (Product f g)))) (h (b (Product f g))) :: k1 -> Type) -> (forall (a :: k). f a) -> Rec (h (b (P 0 f))) (h (b f)) x Source #

(Applicative h, Applicative m, ApplicativeB b) => GApplicative 0 (f :: k -> Type) (g :: k -> Type) (Rec (m (h (b (P 0 f)))) (m (h (b f))) :: k1 -> Type) (Rec (m (h (b (P 0 g)))) (m (h (b g))) :: k1 -> Type) (Rec (m (h (b (P 0 (Product f g))))) (m (h (b (Product f g)))) :: k1 -> Type) |

Instance details

Defined in Barbies.Internal.ApplicativeB

Methods

gprod :: forall (x :: k1). Proxy 0 -> Proxy f -> Proxy g -> Rec (m (h (b (P 0 f)))) (m (h (b f))) x -> Rec (m (h (b (P 0 g)))) (m (h (b g))) x -> Rec (m (h (b (P 0 (Product f g))))) (m (h (b (Product f g)))) x Source #

gpure :: forall (x :: k1). (f ~ g, (Rec (m (h (b (P 0 f)))) (m (h (b f))) :: k1 -> Type) ~ (Rec (m (h (b (P 0 g)))) (m (h (b g))) :: k1 -> Type)) => Proxy 0 -> Proxy f -> Proxy (Rec (m (h (b (P 0 f)))) (m (h (b f))) :: k1 -> Type) -> Proxy (Rec (m (h (b (P 0 (Product f g))))) (m (h (b (Product f g)))) :: k1 -> Type) -> (forall (a :: k). f a) -> Rec (m (h (b (P 0 f)))) (m (h (b f))) x Source #

GConstraints n (c :: k1 -> Constraint) (f :: k2) (Rec a' a :: Type -> Type) (Rec b' b :: k3 -> Type) (Rec b' b :: k3 -> Type) |
Instance details Defined in Barbies.Generics.Constraints Methods gaddDicts :: forall (x :: k3). GAll n c (Rec a' a :: Type -> Type) => Rec b' b x -> Rec b' b x Source #
FunctorB b => GFunctor 0 (f :: k -> Type) (g :: k -> Type) (Rec (b' (P 0 f)) (b f) :: k1 -> Type) (Rec (b' (P 0 g)) (b g) :: k1 -> Type) |
Instance details Defined in Barbies.Internal.FunctorB Methods gmap :: forall (x :: k1). Proxy 0 -> (forall (a :: k). f a -> g a) -> Rec (b' (P 0 f)) (b f) x -> Rec (b' (P 0 g)) (b g) x Source #
(Functor h, FunctorB b) => GFunctor 0 (f :: k1 -> Type) (g :: k1 -> Type) (Rec (h' (b' (P 0 f))) (h (b f)) :: k3 -> Type) (Rec (h' (b' (P 0 g))) (h (b g)) :: k3 -> Type) |
Instance details Defined in Barbies.Internal.FunctorB Methods gmap :: forall (x :: k3). Proxy 0 -> (forall (a :: k1). f a -> g a) -> Rec (h' (b' (P 0 f))) (h (b f)) x -> Rec (h' (b' (P 0 g))) (h (b g)) x Source #
(Functor h, Functor m, FunctorB b) => GFunctor 0 (f :: k1 -> Type) (g :: k1 -> Type) (Rec (m' (h' (b' (P 0 f)))) (m (h (b f))) :: k4 -> Type) (Rec (m' (h' (b' (P 0 g)))) (m (h (b g))) :: k4 -> Type) |
Instance details Defined in Barbies.Internal.FunctorB Methods gmap :: forall (x :: k4). Proxy 0 -> (forall (a :: k1). f a -> g a) -> Rec (m' (h' (b' (P 0 f)))) (m (h (b f))) x -> Rec (m' (h' (b' (P 0 g)))) (m (h (b g))) x Source #
(Functor f, Distributive h, DistributiveB b) => GDistributive n f (Rec (h (b (P n g))) (h (b g)) :: k -> Type) (Rec (h (b (P n (Compose f g)))) (h (b (Compose f g))) :: k -> Type) |
Instance details Defined in Barbies.Internal.DistributiveB Methods gdistribute :: forall (x :: k). Proxy n -> f (Rec (h (b (P n g))) (h (b g)) x) -> Rec (h (b (P n (Compose f g)))) (h (b (Compose f g))) x Source #
(Functor f, DistributiveB b) => GDistributive 0 f (Rec (b' (P 0 g)) (b g) :: k -> Type) (Rec (b' (P 0 (Compose f g))) (b (Compose f g)) :: k -> Type) |
Instance details Defined in Barbies.Internal.DistributiveB Methods gdistribute :: forall (x :: k). Proxy 0 -> f (Rec (b' (P 0 g)) (b g) x) -> Rec (b' (P 0 (Compose f g))) (b (Compose f g)) x Source #
(ConstraintsB b, AllB c b) => GConstraints 0 (c :: k -> Constraint) (f :: k -> Type) (Other (b' (P 0 (X :: k -> Type))) (b (X :: k -> Type))) (Rec (b' (P 0 f)) (b f) :: k2 -> Type) (Rec (b' (P 0 (Product (Dict c) f))) (b (Product (Dict c) f)) :: k2 -> Type) |
Instance details Defined in Barbies.Internal.ConstraintsB Methods gaddDicts :: forall (x :: k2). GAll 0 c (Other (b' (P 0 (X :: k -> Type))) (b (X :: k -> Type))) => Rec (b' (P 0 f)) (b f) x -> Rec (b' (P 0 (Product (Dict c) f))) (b (Product (Dict c) f)) x Source #
(ConstraintsB b, AllB c b) => GConstraints 0 (c :: k -> Constraint) (f :: k -> Type) (Self (b' (P 0 (X :: k -> Type))) (b (X :: k -> Type))) (Rec (b' (P 0 f)) (b f) :: k2 -> Type) (Rec (b' (P 0 (Product (Dict c) f))) (b (Product (Dict c) f)) :: k2 -> Type) |
Instance details Defined in Barbies.Internal.ConstraintsB Methods gaddDicts :: forall (x :: k2). GAll 0 c (Self (b' (P 0 (X :: k -> Type))) (b (X :: k -> Type))) => Rec (b' (P 0 f)) (b f) x -> Rec (b' (P 0 (Product (Dict c) f))) (b (Product (Dict c) f)) x Source #
GConstraints n (c :: k1 -> Constraint) (f :: k1 -> Type) (Rec (P n (X :: k1 -> Type) a') (X a) :: Type -> Type) (Rec (P n f a') (f a) :: k2 -> Type) (Rec (P n (Product (Dict c) f) a') (Product (Dict c) f a) :: k2 -> Type) |
Instance details Defined in Barbies.Generics.Constraints Methods gaddDicts :: forall (x :: k2). GAll n c (Rec (P n (X :: k1 -> Type) a') (X a) :: Type -> Type) => Rec (P n f a') (f a) x -> Rec (P n (Product (Dict c) f) a') (Product (Dict c) f a) x Source #
type GAll n (c :: k -> Constraint) (Rec l r :: Type -> Type) |
Instance details Defined in Barbies.Generics.Constraints type GAll n (c :: k -> Constraint) (Rec l r :: Type -> Type) = GAllRec n c l r