suggestion: add a .ehs file type
Alex Jacobson
alex at alexjacobson.com
Wed Nov 21 19:26:10 EST 2007
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):
>
> http://hpaste.org/3855
>
> {-# OPTIONS_GHC -fbang-patterns #-}
> foo _ = "lol"
>
> main = putStrLn (foo "wut")
> where
> foo !x = x
>
>
> Duncan
More information about the Glasgow-haskell-users
mailing list