BSD-3-Clause licensed by Athan Clark
Maintained by [email protected]
This version can be pinned in stack with:n-tuple-0.0.3@sha256:d437b2c8e0cc35c54c962e3b485793dabe7d0a36cf07f19ab50c8e034926028f,1056

Module documentation for 0.0.3

n-tuple

This is a silly implementation of “homogeneous n-length tuples” – basically an array. Internally, it builds a Vector, and projections just pull that index.

{-# LANGUAGE DataKinds -#}

import Data.NTuple


foo :: NTuple 3 String
foo
  = incl _3 "three"
  . incl _2 "two"
  . incl _1 "one"
  $ empty


one :: String
one = proj _1 foo

two :: String
two = proj _2 foo