origami-0.0.5: An un-SYB framework for transforming heterogenous data through folds

Safe HaskellNone
LanguageHaskell2010

Data.Origami.Internal.FoldFamily

Contents

Description

Data structures representing a set of datatypes to be folded.

Synopsis

Data structures

newtype FoldFamily Source

Represents a set of datatypes to be folded.

Constructors

FoldFamily [DataTy] 

data DataTy Source

Represents a datatype to be folded.

Constructors

DataTy Name [DataCase] 

data DataCase Source

Represents one way to construct a datatype; that is, one of its constructors and its arguments.

Constructors

DataCase Name [DataField] 

data DataField Source

Represents a component of a datatype; that is, an argument to one of its constructors.

Constructors

Atomic Ty

a type to be taken verbatim, not to be folded

Nonatomic Ty

a type to be recursively folded

Funct Name DataField

an application of a Functor

Bifunct Name DataField DataField

an application of a Bifunctor

Trifunct Name DataField DataField DataField

an application of a Trifunctor

newtype Ty Source

Represents a datatype's name.

Constructors

Ty Name 

Lenses

class HasName d where Source

Access to the Name of a Data structure

Methods

name :: Lens' d Name Source

dataCases :: Lens' DataTy [DataCase] Source

Access to the DataCases of a datatype

dataFields :: Lens' DataCase [DataField] Source

Access to the DataFieldss of a DataCase

dataTys :: Iso' FoldFamily [DataTy] Source

Access to the datatypes of a fold family.

Prisms

_Atomic :: Prism' DataField Ty Source

Provides a Traversal for an atomic Ty in a DataField

_Nonatomic :: Prism' DataField Ty Source

Provides a Traversal for an nonatomic Ty in a DataField

_Funct :: Prism' DataField (Name, DataField) Source

Provides a Traversal for a Functor application in a DataField

_Trifunct :: Prism' DataField (Name, DataField, DataField, DataField) Source

Provides a Traversal for a Trifunctor application in a DataField