n-tuple: Homogeneous tuples of arbitrary length.

[ bsd3, library, unclassified ] [ Propose Tags ]

Please see the README on Github at https://github.com/athanclark/n-tuple#readme

[Skip to Readme]


[Index] [Quick Jump]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS] 0.0.0, 0.0.1,,, 0.0.3
Dependencies base (>=4.11 && <5), singletons-base (>=3), vector [details]
License BSD-3-Clause
Copyright BSD-3
Author Athan Clark
Maintainer athan.clark@gmail.com
Home page https://github.com/athanclark/n-tuple#readme
Bug tracker https://github.com/athanclark/n-tuple/issues
Source repo head: git clone https://github.com/athanclark/n-tuple
Uploaded by athanclark at 2023-09-26T18:45:00Z
Distributions LTSHaskell:0.0.3, Stackage:0.0.3
Reverse Dependencies 2 direct, 7 indirect [details]
Downloads 2721 total (13 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-09-26 [all 1 reports]

Readme for n-tuple-0.0.3

[back to package description]


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
  = incl _3 "three"
  . incl _2 "two"
  . incl _1 "one"
  $ empty

one :: String
one = proj _1 foo

two :: String
two = proj _2 foo