[Haskell-cafe] Re: Implementing fixed-sized vectors (using
bjorn.buckwalter at gmail.com
Thu Jan 31 13:49:38 EST 2008
Alfonso Acosta <alfonso.acosta <at> gmail.com> writes:
> 2) An implementation of type-level Naturals would really help. What
> has already been done?
I see you have received many suggestions already and personally I don't think
you can go wrong with Oleg (et al)'s implementations. For a decimal
representation you probably don't have much choice anyway!
For completeness let me mention that an unadvertised part of the Dimensional
library is an implementation of type-level unary Integers (as opposed to
Naturals). Addition, subtraction, multiplication and division is supported.
As I side note I've spent quite some time experimenting with fixed-size vectors
and matrices with heterogeneous elements. For this I've been using Oleg, Ralf
and Keean's HList library which also has type-level unary Naturals.
More information about the Haskell-Cafe