[Haskell-cafe] deriving

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Mon Apr 7 15:48:40 EDT 2008


On Apr 7, 2008, at 15:42 , Hans Aberg 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.

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH




More information about the Haskell-Cafe mailing list