BSD-3-Clause licensed by Chris Done
Maintained by chrisdone@gmail.com

Module documentation for 0.3.2

This version can be pinned in stack with:labels-0.3.2@sha256:954c60c2abba5204bedafa814be3ceaa7bfa4d3808b7691bfdf0ac21f8c5b413,954

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