[Haskell-cafe] How to convert a list to a vector encoding its length in its type?

Miguel Mitrofanov miguelimo38 at yandex.ru
Fri Aug 21 12:23:27 EDT 2009


>> Don't worry, it's just me not liking UndecidableInstances.
>
> Without it, GHC doesn't like the 'Arg f ~ b' constraint

He's probably right. I don't like it either.

> What will the type of 'levmarHL' look like using tuples or using your
> special list-like type?

I guess it would be something like

LevMarParamCoolType c => (a -> c -> Double) -> c -> [(a, Double)] -> c


More information about the Haskell-Cafe mailing list