apart-0.1.3: Get all your structure and rip it apart.

Copyright(C) 2018 Murat Kasimov
LicenseBSD-style (see the file LICENSE)
MaintainerMurat Kasimov <iokasimov.m@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe
LanguageHaskell2010

Data.Apart

Description

Get all your structure and rip it apart.

The main idea: if you can describe your data structure via Cofree, with apart you can serialize, persistent or hash a segment of your structure!

A simple introduction to this library can be found here: https://iokasimov.github.io/posts/2018/05/cofree-will-tear-us-apart

Synopsis

Documentation

newtype Apart t raw value Source #

Structure with scattered segments.

Constructors

Apart 

Fields

Instances
Traversable t => Bitraversable (Apart t) Source # 
Instance details

Defined in Data.Apart

Methods

bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Apart t a b -> f (Apart t c d) #

Foldable t => Bifoldable (Apart t) Source # 
Instance details

Defined in Data.Apart

Methods

bifold :: Monoid m => Apart t m m -> m #

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Apart t a b -> m #

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Apart t a b -> c #

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Apart t a b -> c #

Functor t => Bifunctor (Apart t) Source # 
Instance details

Defined in Data.Apart

Methods

bimap :: (a -> b) -> (c -> d) -> Apart t a c -> Apart t b d #

first :: (a -> b) -> Apart t a c -> Apart t b c #

second :: (b -> c) -> Apart t a b -> Apart t a c #

Functor t => Functor (Apart t raw) Source # 
Instance details

Defined in Data.Apart

Methods

fmap :: (a -> b) -> Apart t raw a -> Apart t raw b #

(<$) :: a -> Apart t raw b -> Apart t raw a #

Apply t => Apply (Apart t raw) Source # 
Instance details

Defined in Data.Apart

Methods

(<.>) :: Apart t raw (a -> b) -> Apart t raw a -> Apart t raw b

(.>) :: Apart t raw a -> Apart t raw b -> Apart t raw b

(<.) :: Apart t raw a -> Apart t raw b -> Apart t raw a

liftF2 :: (a -> b -> c) -> Apart t raw a -> Apart t raw b -> Apart t raw c