About

Metadata

  • Last updated , by kakkun61
  • License Apache-2.0
  • Maintained by: kazuki.okamoto@kakkun61.com

  • Lottery factor: 0

Links

Installation

Tested Compilers

  1. 9.0.1
  2. 8.10.4
  3. 8.8.4
  4. 8.6.5

Readme

barbies-layered

Hackage

CI

Sponsor

This is like barbies but these clothes are layered.

For example when there is a following data type,

data Foo = Foo { foo :: [Int] }

barbies requires a following.

data Foo f = Foo { foo :: f [Int] }

But in case of barbies-layered,

data Foo f = Foo { foo :: f [f Int] }

A typical difference is a type of bmap.

-- barbies
type FunctorB :: ((k -> Type) -> Type) -> Constraint
class FunctorB b where
  bmap :: (forall a. f a -> g a) -> b f -> b g

-- barbies-layered
type FunctorB :: ((Type -> Type) -> Type) -> Constraint
class FunctorB b where
  bmap :: (Functor f, Functor g) => (forall a. f a -> g a) -> b f -> b g