my 2p's worth...

Alastair Reid alastair at
Sat Sep 20 11:45:00 EDT 2003

On Friday 19 September 2003 12:09 pm, MR K P SCHUPKE wrote:
> Would it not be better to have control over exactly where these options
> apply, could you not have:
> {-# OPTIONS fallow-overlapping-instances=true #-}
> ... some code ...
> {-# OPTIONS -fallow-overlapping-instances=false #-}
> ... more code ...
> So you can ensure instances you don't want overlapping cannot?

That works for syntactic extensions - we just have to tweak the parser so that 
rules are enabled or diabled accordingly.  (I'm not sure if it's very useful 
but it can be done.)

It doesn't work all that well for typesystem extensions because Haskell's 
typechecker requires definitions to be reordered so that every function 
definition is as local as possible.  It is also hard to have code compiled 
with one typechecker call code compiled with a different typechecker - for 
example, I'm told that making Hugs '-98' flag a per-module option is not 

Alastair Reid

More information about the Glasgow-haskell-users mailing list