> Notwithstanding module Y, I don't think you should infer in module X
> that g::Int (or, rather, Int->Int).

Oops, I meant Int->Int.

> Since f is defined in a type class, it should be polymorphic, and so
> should g.  When you apply g to [an expression of a given] type, it
> will check to see what instances are available, and match only if
> Int is the type of the variable.  But there's no reason to restrict
> the type of g itself.

Sorry I wasn't clear: I meant to be talking about (an approach for)
"closed classes".


_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to