[Haskell-cafe] Re: Problem with fundeps.

Ashley Yakeley ashley at semantic.org
Sun Jan 2 18:29:18 EST 2005


In article <courier.41D874F8.00005EA0 at averell>, karczma at info.unicaen.fr 
wrote:

> This is what I want. For a given set of vectors, the associated
> scalars are unique, otherwise I would have problems with norm.
> But I have problems anyway... 

> >> instance Vspace a a where

This says, for any vector type "a", the associated scalar is "a". That 
pretty much rules out any other instance.

It's the same as writing "instance Vspace v v" of course.

> instance (Num a)=>Vspace a (c->a) where
> instance (Vspace a v) => Vspace a (c->v) where

These are also incompatible. The first says that if the vector type is 
"p -> q", then the scalar type is "q". The second says that if the 
vector type is "p -> q", then the scalar type is some other type "r" 
fulfilling "Vspace r q". Which do you want, "q", or "(Vspace r q) => r"?

-- 
Ashley Yakeley, Seattle WA



More information about the Haskell-Cafe mailing list