[Haskell-cafe] advanced class constraints in Haskell 98?

Henning Thielemann lemming at henning-thielemann.de
Thu Jan 8 19:50:59 EST 2009


On Fri, 9 Jan 2009, Ross Paterson wrote:

> On Fri, Jan 09, 2009 at 01:11:12AM +0100, Henning Thielemann wrote:
>> Maybe the report is not complete? I mean, the current behaviour of Hugs
>> and GHC (as I observed it) is more consistent, and maybe that's what the
>> designers had in mind.
>
> I'm puzzled by the Hugs behaviour.  The current version rejects it, and
> I downloaded and built the Mar2005 version just to check, and it also
> rejected it, saying
>
> 	Illegal Haskell 98 class constraint in class declaration

You are right. I don't know, what I made different before. Btw. 2005 was 
the copyright year, Hugs' version is September 2006:

__   __ __  __  ____   ___      _________________________________________
||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__||  __||     Copyright (c) 1994-2005
||---||         ___||           World Wide Web: http://haskell.org/hugs
||   ||                         Bugs: http://hackage.haskell.org/trac/hugs
||   || Version: September 2006 _________________________________________

Haskell 98 mode: Restart with command line option -98 to enable extensions

ERROR "src/Data/Spreadsheet/CharSource.hs":14 - Illegal Haskell 98 class 
constraint in class declaration
*** Constraint : Monad (a Maybe)
*** Context    : (Monad (a Maybe), Monad (a Identity))


So, since GHC allows this extension without an option - how can I tell 
Cabal, which extension I'm using? Has it a name anyway?


More information about the Haskell-Cafe mailing list