Ticket #1824 (closed bug: fixed)

Opened 1 year ago

Last modified 2 months ago

Make an extension flag for postfix operators

Reported by: igloo Assigned to:
Priority: normal Milestone: 6.10 branch
Component: Compiler (Parser) Version: 6.8.1
Severity: normal Keywords:
Cc: Difficulty: Unknown
Test Case: Architecture: Unknown/Multiple
Operating System: Unknown/Multiple

Description

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.

Change History

11/03/07 09:30:42 changed by guest

actually, since this has been default behaviour in 6.6.1, and in hugs for quite a bit longer, it doesn't seem to have bitten anyone, so i was just asking for the docs to be amended.

claus

07/12/08 15:20:40 changed by igloo

  • status changed from new to closed.
  • resolution set to fixed.

Fixed by

Sat Jul 12 21:37:25 BST 2008  Ian Lynagh <igloo@earth.li>
  * Add PostfixOperators flag for (e op) postfix operators; fixes trac #1824
  -fglasgow-exts also turns it on.

09/30/08 08:40:24 changed by simonmar

  • architecture changed from Unknown to Unknown/Multiple.

09/30/08 08:51:33 changed by simonmar

  • os changed from Unknown to Unknown/Multiple.