BSD-3-Clause licensed by Chris Done
Maintained by [email protected]
This version can be pinned in stack with:labels-0.3.3@sha256:65218090b15662b7845c355eb97bacb28a95aa2805b95987563b9b90f30d88a7,954

Module documentation for 0.3.3


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