[jhc] allowing unqualified method names in instance declarations

Isaac Dupree ml at isaac.cedarswampstudios.org
Sat Nov 14 13:30:49 EST 2009


Henning Thielemann wrote:
> 
> The attached patch shall help accepting an instance declaration like
> 
>> import qualified Custom
>>
>> instance Custom.Class T where
>>    methodA = ...
>>    methodB = ...
> 
> by translating it to
> 
>> instance Custom.Class T where
>>    Custom.methodA = ...
>>    Custom.methodB = ...

Correct.

> I don't know, whether this also works if you do
> 
>> import qualified Custom hiding (methodA, methodB, )

according to the standard as well as GHC, it would be an error.


More information about the jhc mailing list