[Haskell-cafe] deriving

Hans Aberg haberg at math.su.se
Mon Apr 7 18:28:53 EDT 2008


On 7 Apr 2008, at 21:48, Brandon S. Allbery KF8NH wrote:
>> But here, one would have to think about how the compiler should be  
>> able to distinguish
>>   data Bool = False | True
>>     instance (Eq)
>> from
>>   data Bool = False | True
>>
>>   instance Eq Bool where
>>     x == y = ...
>
> Layout already does that, doesn't it?  The former, being indented,  
> is a continuation line.

At least Hugs complains if one does not indent "deriving ...", but I  
do not know what the standard says. If is required, then it can be  
changed.

   Hans




More information about the Haskell-Cafe mailing list