On Mon, Jun 28, 2010 at 12:00 AM, Alexander Solla <[email protected]> wrote:
>
> On Jun 27, 2010, at 12:29 PM, Alexey Khudyakov wrote:
>
>> This is of course faster but what I really want is vectors with length
>> parametrized by type. This way I can write generic code. Uniform
>> representation is requirement for that.
>
> You're going to need dependent types, or a similar construction, for that.
>
> "Do We Need Dependent Types?"
> http://www.brics.dk/RS/01/10/index.html

Dependent types would be nice but there isn't anything usable out there.
Newtype wrapper parametrized by type level number works fine so far.

If you interested sources are available here:
http://bitbucket.org/Shimuuar/nvector
http://bitbucket.org/Shimuuar/type-numbers

Thank you for the link. It seems that part of paper describes
applicative functors.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to