[Haskell-cafe] Implementing fixed-sized vectors (using datatype algebra?)

Henning Thielemann lemming at henning-thielemann.de
Thu Jan 31 09:49:23 EST 2008

On Thu, 31 Jan 2008, Alfonso Acosta wrote:

> On Jan 31, 2008 3:03 PM, Wolfgang Jeltsch <g9ks157k at acme.softbase.org> wrote:
> > Hello Fons,
> >
> > interestingly, it occured to me yesterday that the graphics part of Grapefruit
> > would benefit from fixed sized vectors.  I think we should implement some
> > small Cabal package which just provides this and upload it to the HackageDB.
> > Are you interested in cooperating with me on this?
> Sure I am!
> Actually, thanks to the pointers provided by Henning I learned that
> Oleg (who else!) already has implemented them. See
> http://okmij.org/ftp/Haskell/number-parameterized-types.html
> http://www.haskell.org/tmrwiki/NumberParamTypes
> http://okmij.org/ftp/Haskell/number-param-vector-code.tar.gz (Oleg's
> multiple flavour implementations of fixed-sized vectors)
> I think we should base our implementation on Oleg's (for which we need
> his permission). Actually, I think we should create two separate
> libraries. One for decimal type-level arithmetic

I remember that type-level arithmetic is already implemented somewhere,
certainly more than once, but certainly seldom in a nicely packaged form.

erm, here

also here:

More information about the Haskell-Cafe mailing list