chrisdone-archive/labels

Declare and access tuple fields with labels

Haskell

58

79 commits

updated Jan 2, 2019

See the code

README

labels

Declare and access tuple fields with labels

$ git clone --recursive git@github.com:chrisdone/labels

The basic package

The labels package just provides labels and has very small source code and dependencies.

Some trivial examples provided by the labels package:

Get fields of a record
> get #bar (#foo := "hi", #bar := 123)
123
Set fields of a record
> set #bar 66 (#foo := "hi", #bar := 123)
(#foo := "hi",#bar := 66)

Note: You need GHC 8.0.1.

Integration with other packages

There are integration packages for getting labelled things out of common data parsers:

Data exploration package

I have put together a simple packge which brings together various packages around labels into one package:

Contributors

chrisdone

75 commits

jchia

3 commits

nh2

1 commits

chrisdone-archive/labels

Declare and access tuple fields with labels

Haskell

58

79 commits

updated Jan 2, 2019

See the code

README

labels

Declare and access tuple fields with labels

$ git clone --recursive git@github.com:chrisdone/labels

The basic package

The labels package just provides labels and has very small source code and dependencies.

Some trivial examples provided by the labels package:

Get fields of a record
> get #bar (#foo := "hi", #bar := 123)
123
Set fields of a record
> set #bar 66 (#foo := "hi", #bar := 123)
(#foo := "hi",#bar := 66)

Note: You need GHC 8.0.1.

Integration with other packages

There are integration packages for getting labelled things out of common data parsers:

Data exploration package

I have put together a simple packge which brings together various packages around labels into one package:

Contributors

chrisdone

75 commits

jchia

3 commits

nh2

1 commits

Languages

Haskell

96.8%

CSS

1.6%

JavaScript

1.6%