Skip to content

Make an extension flag for postfix operators

From this thread: http://www.haskell.org/pipermail/cvs-ghc/2007-November/039289.html

> 2 while looking up 8.3.7, i saw this note in 8.3.6, on
>    postfix operators:
> 
>    "(No Haskell 98 programs change their behaviour, of course.)" 
> 
>    like so many "of course" notes, this is wrong, of course;-)
>    haskell98 has seq, and that makes eta-expansion observable.
> 
>    $ /cygdrive/c/ghc/ghc-6.4.1/bin/ghc -e 
>        'let (!) a = undefined in (undefined !) `seq` True'
>    True
> 
>    $ /cygdrive/c/ghc/ghc-6.6.1/bin/ghc -e 
>        'let (!) a = undefined in (undefined !) `seq` True'
>    *** Exception: Prelude.undefined

Good point. We probably ought to make it an extension and give it a -X 
flag anyway; I don't think (without having looked at the code) it should
be hard.
Trac metadata
Trac field Value
Version 6.8.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Parser)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information