[Haskell-cafe] Construction of short vectors

Alexey Khudyakov alexey.skladnoy at gmail.com
Mon Jun 28 12:45:30 EDT 2010


On Mon, Jun 28, 2010 at 7:02 PM, Jake McArthur <jake.mcarthur at gmail.com> wrote:
> On Sun, Jun 27, 2010 at 4:44 PM, Alexey Khudyakov
> <alexey.skladnoy at gmail.com> wrote:
>> 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
>
> I haven't looked to see how complete your code is, but feel free to
> take over the vector-static [1] project if you wish to use some
> existing code. I haven't taken the time yet to say so on the Hackage
> page, but it's not currently being maintained.
>
I'm aware about this package but I didn't use it because it's completely
undocumented.

Also my code is a bit different. Vector is parametrized by two phantom type
parameters. One is vector length another is type of vector. I want to
be able to
differentiate between different vectors (euclidean vector and
polynomial coefficients
have different types)

There is also one rather wild idea. Since function for fixed vectors only wraps
function from vector in theory it could be possible to generate most of code.


More information about the Haskell-Cafe mailing list