
8 Oct
2008
8 Oct
'08
1:16 p.m.
I think the technique described at http://haskell.org/haskellwiki/GHC/AdvancedOverlap may give you what you want. I've never tried it myself though. / Emil Tobias Bexelius skrev:
Yeah, I realized that.
But heres where I would like the undecidable incoherent instances to kick in, i.e. as long as I haven't got any NumVec instances GHC should be able to choose only one of the Mult instances. Or do I have too much faith in the -fallow-incoherent-instances flag now? :/
I would like to be able to write something like
instance (Vec a x, -Num (a x)) => Mult (a x) (a x) x where (*.) = dot where -Num (a x) means that (a x) must not be an instance of Num. Can I express this in some way?
Regards Tobias