origami: A framework for transforming heterogenous data through folds

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

This package provides a framework for transforming heterogenous data in a typed manner using folds and provides Template Haskell macros for automatically producing the necessary boilerplate.

Given a set of datatypes, we generate a record declaration called Fold, parameterized over one type variable for each datatype. For each constructor Xxx used by any of these types, a field mkXxx is generated. (A few utility Fold values are additionally defined.)

For each datatype Yyy, we also generate a foldYyy function that applies a Fold to its Yyy argument, resulting in a yyy value. Conceptually, any constructor Xxx in the argument or any of its sub-components is recursively replaced bottom-up by an application of mkXxx.

The set of datatypes, the fold family, is specified by giving a list of root datatypes. Datatypes may be designated as atomic: they will not be recursed into.

In general, the framework does not handle parameterized datatypes, but applications of Traversable, Bitraversable, or Tritraversable can be handled, if declared by the user. The n-ary functors are treated as "transparent" and traversed through.

See the website for more information and examples.

Properties

Versions 0.0.1, 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6
Change log None available
Dependencies base (>=4 && <5), bifunctors (>=4.2 && <4.3), containers (>=0.5 && <0.6), lens (>=4.7 && <4.8), mtl (>=2.1 && <2.2), pretty (>=1.1 && <1.2), template-haskell [details]
License BSD-3-Clause
Copyright (c) 2015 Eric Nedervold
Author Eric Nedervold<nedervoldsoftware@gmail.com>
Maintainer Eric Nedervold<nedervoldsoftware@gmail.com>
Category Data
Home page http://github.com/nedervold/origami
Bug tracker http://github.com/nedervold/origami/issues
Source repo head: git clone git://github.com/nedervold/origami.git
Uploaded by nedervold at 2015-02-08T02:53:19Z

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees