BSD3 licensed by Chris Done
Maintained by chrisdone@gmail.com

Module documentation for 0.3.3

There are no documented modules for this package.

labels

Declare and access tuple fields with labels

This package is experimental, exploring the design space opened up by the implemented and to-be-implemented work on extensible records in GHC.

Note: You need GHC 8.0.1.

Basic examples

The haddock docs are here.

Enable these extensions:

  • In GHCi: :set -XOverloadedLabels -XTypeOperators -XDataKinds -XFlexibleContexts

  • In a module: {-# LANGUAGE OverloadedLabels, TypeOperators, DataKinds, FlexibleContexts #-}

Let’s use GHCi:

> import Labels
> :set -XOverloadedLabels -XTypeOperators -XDataKinds -XFlexibleContexts

Changes

0.3.1:
* Export Labels class.

0.3.1:
* Add Subset class.

0.3.0:
* Put labels in its own class.
* Change type of labels to take a Proxy.

0.2.0:
* Add "reflect" and "labels" functions.
* Drop support for GHC <8.

0.1.2:
* Add docs for "project" function.

0.1.1:
* Add "project" function.

0.1.0:
* Drop the convenience accessor #foo. Must use get #foo

0.0.0:
* First version
Depends on 2 packages:
Used by 1 package:
comments powered byDisqus