
Ok, I'm game to default to haskell98 in the presence of ambiguity, but in most cases the extension involves new syntax and that should be enough. Note: I would also argue that extensions that change the meaning of old code are prime-facie a bad idea. It means that, if you start using the new syntax in your existing code, you have manually to audit your code to make sure nothing else got broken and that is difficult even for experts to do really well. The example you provide is actually evidence that this bang-pattern extension is probably a bad one. -Alex- Duncan Coutts wrote:
On Wed, 2007-11-21 at 15:03 -0500, Alex Jacobson wrote:
Proof that the compiler knows which extensions are being used: it can compile the program sucessfully when the extension is turned on and not otherwise.
Counterexample (not my own):
{-# OPTIONS_GHC -fbang-patterns #-} foo _ = "lol"
main = putStrLn (foo "wut") where foo !x = x
Duncan