
11 Jun
2009
11 Jun
'09
9:53 a.m.
Claus Reinke wrote:
if module 'A' exports multiparameter type classes, importers of those classes have to have MultiParamTypeClasses on - there are no legal uses of those imports otherwise (while FlexibleInstances/Contexts can just affect a subset of use sites).
say we have module A where { class Coerce a b where coerce :: a -> b } module B where { import A ; co a = coerce a } Syntactically, module B doesn't require MultiParamTypeClasses because the signature that's involved is only discovered during type inference. Something to beware of if those restrictions need to be implemented somehow in GHC. Niklas Broberg wrote:
If there is any interest, I can also propose these cases as bug reports to GHC.
please do! -Isaac