RFC: qualified vs unqualified names in defining instance methods
Malcolm Wallace
malcolm.wallace at cs.york.ac.uk
Fri Apr 25 10:52:27 EDT 2008
> It is illegal to give a binding for a class method that is not in
> scope, but the name under which it is in scope is immaterial; in
> particular, it may be a qualified name.
I believe this was a change introduced in H'98 to tidy up the
language. Previously, if a class was imported qualified, it was only
possible to declare an instance method by using a qualified name on
the lhs. It was felt that this was an oddity, because there are no
other situations in which it was even possible to define a variable
with an explicitly-qualified name, and in any case the qualification
was entirely redundant, because there was no ambiguity.
Additionally, permitting a qualified name to appear in the
definitional position of any declaration led to ambiguity in parsing.
Regards,
Malcolm
More information about the Haskell-prime
mailing list