n-tuple

Homogeneous tuples of arbitrary length.

https://github.com/athanclark/n-tuple#readme

Version on this page:0.0.1.1
LTS Haskell 22.14:0.0.3
Stackage Nightly 2024-03-28:0.0.3
Latest on Hackage:0.0.3

See all snapshots n-tuple appears in

BSD-3-Clause licensed by Athan Clark
Maintained by [email protected]
This version can be pinned in stack with:n-tuple-0.0.1.1@sha256:977c03c730d02324266ea98afa6bf230c1295b260419397df5e90d54d7801839,785

Module documentation for 0.0.1.1

n-tuple

{-# 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