barbies-layered: Barbies with layered clothes.

[ apache, data-structures, library ] [ Propose Tags ]

Data with fields that are multiply covered with functors.


[Skip to Readme]
Versions [RSS] [faq] 0.1.0.0
Change log CHANGELOG.md
Dependencies barbies, base (==4.*), transformers [details]
License Apache-2.0
Copyright 2021 Kazuki Okamoto (岡本和樹)
Author Kazuki Okamoto (岡本和樹)
Maintainer kazuki.okamoto@kakkun61.com
Category Data-structures
Home page https://github.com/kakkun61/barbies-layered
Bug tracker https://github.com/kakkun61/barbies-layered/issues
Uploaded by kakkun61 at 2021-07-15T15:35:37Z
Distributions NixOS:0.1.0.0
Downloads 59 total (10 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2021-07-15 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Candidates


Readme for barbies-layered-0.1.0.0

[back to package description]

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