barbies-layered: Barbies with layered clothes.

[ apache, data-structures, library ] [ Propose Tags ] [ Report a vulnerability ]

Data with fields that are multiply covered with functors.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0
Change log CHANGELOG.md
Dependencies barbies, base (>=4 && <5), transformers [details]
Tested with ghc ==8.6.5, ghc ==8.8.4, ghc ==8.10.4, ghc ==9.0.1
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 289 total (10 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2021-07-15 [all 1 reports]

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