(No)MonoPatBinds

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Sun Nov 18 18:17:33 EST 2007


On Sun, 2007-11-18 at 16:20 +0000, Ian Lynagh wrote:
> Hi all,
> 
> Does this patch:
> 
> [The extension is NoMonoPatBinds not MonoPatBinds
> Duncan Coutts <duncan at haskell.org>**20071109142217] {
> hunk ./Language/Haskell/Extension.hs 107
> -  | MonoPatBinds
> +  | NoMonoPatBinds
> }
> 
> break the GHC >= 6.8 extension handling? My memory is that we allow
> the strings Foo and NoFoo, for each extension constructor Foo.

Not sure but there are already two other extensions
NoMonomorphismRestriction and NoImplicitPrelude. I think we considered
that at the time. Here's the code:

        return [ (ext, "-X" ++ show ext)
               | extStr <- breaks isSep exts
               , (ext, "") <- reads extStr ++ reads ("No" ++ extStr) ]

So it looks like it's handled.

> I'm not sure if anyone would ever want to specify the default (e.g.
> NoCPP) in a Cabal file, though.

We do not have a way of specifying negatives of extensions.

Duncan



More information about the cabal-devel mailing list