@hackage / RepLib

Generic programming library with representation types

Latest0.5.4.1

About

Metadata

  • Last updated , by sweirich
  • License BSD-3-Clause
  • Categories Generics
  • Maintained by: Stephanie Weirich <sweirich@cis.upenn.edu>

  • Lottery factor: 0

Links

Installation

Tested Compilers

  1. 8.6.1
  2. 8.4.3
  3. 8.2.2

Readme


-- Maintainer : sweirich@cis.upenn.edu -- Stability : experimental -- Portability : non-portable

-- RepLib -- a library of derivable type classes based on representation types


This library contains the following modules:

Generics.RepLib.R - Basic type representations Generics.RepLib.R1 - Parameterized type representations Generics.RepLib.Derive - Template Haskell code to automatically derive representations of datatypes. Generics.RepLib.PreludeReps - Reps of Prelude types Generics.RepLib.RepAux - Helper functions to define type-indexed functions

Generics.RepLib.Lib - Examples of specializable type-indexed functions Generics.RepLib.PreludeLib - Examples type-indexed functions from prelude

Generics.RepLib.SYB.Aliases - SYB: Port of Data.Generics.Aliases Generics.RepLib.SYB.Schemes - SYB: Port of Data.Generics.Schemes

RepLib - Top-level module that re-exports all of the above

To use this library, import RepLib and derive representations of your datatypes. The "Lib" module contains a number of type-indexed operations that have been predefined.

Currently, representations of datatypes with record components, GADTs and nested datatypes cannot be automatically derived.