Skip to content

Instantly share code, notes, and snippets.

View jamesdbrock's full-sized avatar

James Brock jamesdbrock

View GitHub Profile
@jamesdbrock
jamesdbrock / record.md
Last active November 23, 2016 08:11 — forked from fumieval/record.md

extensible is a library for extensible data types. It provides extensible product and sum types parameterized by type-level lists.

This tutorial introduces extensible records, an application of the extensible products.

First, we pass a space-separated list of field names to mkField:

{-# LANGUAGE TemplateHaskell, DataKinds, TypeOperators, FlexibleContexts #-}
{-# OPTIONS_GHC -fno-warn-unticked-promoted-constructors #-}