RE: [GHC] #2798: Enable rec keyword when RecursiveDo is enabled?

2010-01-05 Thread Simon Peyton-Jones
| I hope that it does but I have not installed GHC 6.12 yet.  I was
| wondering more how to write new programs that are not restricted to
| work only with GHC = 6.12.1.  Sometimes one can make things portable
| with a bit of CPP---not pretty but it works---but, in this case, I
| could not think of a good way to do this, so if anyone has ideas...

Yes you can.  Since nothing except 6.12 has 'rec', you can use 'mdo'.  If you 
don't want the deprecation warning use -fno-warn-deprecations.

Of course *any* feature removal is going to lead to programs that used to work 
not working any more.  I don't see how to avoid that, except by keeping all 
features forever.  We can keep mdo as long as necessary, I suppose, but I'd 
like some mechanism to gently encourage people to the rec syntax, which is what 
the deprecation warning should do.

Simon
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #2798: Enable rec keyword when RecursiveDo is enabled?

2010-01-03 Thread GHC
#2798: Enable rec keyword when RecursiveDo is enabled?
---+
  Reporter:  nominolo  |  Owner:  igloo   
  Type:  task  | Status:  closed  
  Priority:  high  |  Milestone:  6.14.1  
 Component:  Compiler  |Version:  6.11
Resolution:  fixed |   Keywords:  
Difficulty:  Unknown   | Os:  Unknown/Multiple
  Testcase:|   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  |  
---+
Changes (by igloo):

  * status:  new = closed
  * failure:  = None/Unknown
  * resolution:  = fixed

Comment:

 It was done for 6.12.1 after all. `RecursiveDo` is deprecated in favour of
 `DoRec`.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2798#comment:13
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #2798: Enable rec keyword when RecursiveDo is enabled?

2010-01-03 Thread Iavor Diatchki
Hello,
so with these changes, what is the preferred way to write recursive
monadic code that will work on GHC  6.12.1, GHC = 6.12.1, and Hugs?
I guess, one could always fall back to just using mfix directly but
this seems unfortunate.
-Iavor



On Sun, Jan 3, 2010 at 5:23 AM, GHC t...@galois.com wrote:
 #2798: Enable rec keyword when RecursiveDo is enabled?
 ---+
  Reporter:  nominolo      |          Owner:  igloo
      Type:  task          |         Status:  closed
  Priority:  high          |      Milestone:  6.14.1
  Component:  Compiler      |        Version:  6.11
 Resolution:  fixed         |       Keywords:
 Difficulty:  Unknown       |             Os:  Unknown/Multiple
  Testcase:                |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  |
 ---+
 Changes (by igloo):

  * status:  new = closed
  * failure:  = None/Unknown
  * resolution:  = fixed

 Comment:

  It was done for 6.12.1 after all. `RecursiveDo` is deprecated in favour of
  `DoRec`.

 --
 Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2798#comment:13
 GHC http://www.haskell.org/ghc/
 The Glasgow Haskell Compiler
 ___
 Glasgow-haskell-bugs mailing list
 Glasgow-haskell-bugs@haskell.org
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #2798: Enable rec keyword when RecursiveDo is enabled?

2009-09-23 Thread GHC
#2798: Enable rec keyword when RecursiveDo is enabled?
-+--
Reporter:  nominolo  |Owner:  igloo   
Type:  task  |   Status:  new 
Priority:  high  |Milestone:  6.14.1  
   Component:  Compiler  |  Version:  6.11
Severity:  minor |   Resolution:  
Keywords:|   Difficulty:  Unknown 
Testcase:|   Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
-+--
Changes (by igloo):

  * milestone:  6.12.1 = 6.14.1

Comment:

 Won't be done in time for 6.12.1.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2798#comment:12
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #2798: Enable rec keyword when RecursiveDo is enabled?

2009-08-21 Thread GHC
#2798: Enable rec keyword when RecursiveDo is enabled?
-+--
Reporter:  nominolo  |Owner:  igloo   
Type:  task  |   Status:  new 
Priority:  high  |Milestone:  6.12.1  
   Component:  Compiler  |  Version:  6.11
Severity:  minor |   Resolution:  
Keywords:|   Difficulty:  Unknown 
Testcase:|   Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
-+--
Changes (by igloo):

  * owner:  = igloo

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2798#comment:11
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #2798: Enable rec keyword when RecursiveDo is enabled?

2009-07-11 Thread GHC
#2798: Enable rec keyword when RecursiveDo is enabled?
-+--
Reporter:  nominolo  |Owner:  
Type:  task  |   Status:  new 
Priority:  high  |Milestone:  6.12.1  
   Component:  Compiler  |  Version:  6.11
Severity:  minor |   Resolution:  
Keywords:|   Difficulty:  Unknown 
Testcase:|   Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
-+--
Comment (by igloo):

 Extensions can be marked deprecated in `xFlags` in
 `compiler/main/DynFlags.hs`.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2798#comment:10
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #2798: Enable rec keyword when RecursiveDo is enabled?

2009-06-01 Thread GHC
#2798: Enable rec keyword when RecursiveDo is enabled?
-+--
Reporter:  nominolo  |Owner:  
Type:  task  |   Status:  new 
Priority:  high  |Milestone:  6.12.1  
   Component:  Compiler  |  Version:  6.11
Severity:  minor |   Resolution:  
Keywords:|   Difficulty:  Unknown 
Testcase:|   Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
-+--
Comment (by simonmar):

 We (Simon  Simon) think the ideal state of affairs would be:

   * Allow `rec` in `do` (as Ross intended)
   * Deprecate `mdo`

 as far as flags go, there are two options:

   * have the existing `RecursiveDo` flag enable the new `rec` syntax, and
 deprecate the use of `mdo`.  Eventually `mdo` would be removed as a
 keyword.

   * Define a new extension, e.g. `DoRec` for the new `rec` keyword, and
 deprecate the old `RecursiveDo` extension.

 The second approach has the benefit that we can identify obsolete code on
 Hackage without trying to compile it, but it means having two similarly-
 named extensions which could lead to confusion.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2798#comment:6
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #2798: Enable rec keyword when RecursiveDo is enabled?

2009-06-01 Thread GHC
#2798: Enable rec keyword when RecursiveDo is enabled?
-+--
Reporter:  nominolo  |Owner:  
Type:  task  |   Status:  new 
Priority:  high  |Milestone:  6.12.1  
   Component:  Compiler  |  Version:  6.11
Severity:  minor |   Resolution:  
Keywords:|   Difficulty:  Unknown 
Testcase:|   Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
-+--
Comment (by duncan):

 I don't think I'd bother with changing the extension name. We can discover
 deprecated stuff on hackage automatically by other (more general) means.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2798#comment:7
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #2798: Enable rec keyword when RecursiveDo is enabled?

2009-06-01 Thread GHC
#2798: Enable rec keyword when RecursiveDo is enabled?
-+--
Reporter:  nominolo  |Owner:  
Type:  task  |   Status:  new 
Priority:  high  |Milestone:  6.12.1  
   Component:  Compiler  |  Version:  6.11
Severity:  minor |   Resolution:  
Keywords:|   Difficulty:  Unknown 
Testcase:|   Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
-+--
Comment (by isaacdupree):

 my feeling is to prefer `DoRec` -- it sounds more mnemonic to me; and it
 seems unpleasant for an extension to have two substantially different
 parsings that might conflict with existing code (if 'rec' is a variable
 name somewhere).  e.g. how will haskell-src[-exts] deal with it after the
 Summer-of-Code effort?  But I don't really mind either way.  (P.S. do we
 have a way to mark extension-flags deprecated?)
 -Isaac

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2798#comment:8
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #2798: Enable rec keyword when RecursiveDo is enabled?

2009-06-01 Thread GHC
#2798: Enable rec keyword when RecursiveDo is enabled?
-+--
Reporter:  nominolo  |Owner:  
Type:  task  |   Status:  new 
Priority:  high  |Milestone:  6.12.1  
   Component:  Compiler  |  Version:  6.11
Severity:  minor |   Resolution:  
Keywords:|   Difficulty:  Unknown 
Testcase:|   Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
-+--
Comment (by isaacdupree):

 so if you want your code to compile on pre-6.12 you can:

 - just use `mdo`

 - use `rec` and enable `Arrows` also (I guess this hack could be, but
 shouldn't be, sanctioned by Cabal.. among other things, Arrows also
 introduces `proc` as a keyword, so it's not harmless)

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2798#comment:9
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #2798: Enable rec keyword when RecursiveDo is enabled?

2009-04-10 Thread GHC
#2798: Enable rec keyword when RecursiveDo is enabled?
-+--
Reporter:  nominolo  |Owner:  
Type:  task  |   Status:  new 
Priority:  high  |Milestone:  6.12.1  
   Component:  Compiler  |  Version:  6.11
Severity:  minor |   Resolution:  
Keywords:|   Difficulty:  Unknown 
Testcase:|   Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
-+--
Changes (by igloo):

  * priority:  normal = high
  * milestone:  6.12 branch = 6.12.1

Comment:

 6.12.1 would be a good time to come to a decision about this.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2798#comment:5
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #2798: Enable rec keyword when RecursiveDo is enabled?

2008-11-27 Thread GHC
#2798: Enable rec keyword when RecursiveDo is enabled?
-+--
Reporter:  nominolo  |Owner:  
Type:  task  |   Status:  new 
Priority:  normal|Milestone:  6.12 branch 
   Component:  Compiler  |  Version:  6.11
Severity:  minor |   Resolution:  
Keywords:|   Difficulty:  Unknown 
Testcase:|   Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
-+--
Changes (by igloo):

  * milestone:  = 6.12 branch

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2798#comment:4
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #2798: Enable rec keyword when RecursiveDo is enabled?

2008-11-24 Thread GHC
#2798: Enable rec keyword when RecursiveDo is enabled?
--+-
 Reporter:  nominolo  |  Owner:  
 Type:  task  | Status:  new 
 Priority:  normal|  Milestone:  
Component:  Compiler  |Version:  6.11
 Severity:  minor | Resolution:  
 Keywords:| Difficulty:  Unknown 
 Testcase:|   Architecture:  Unknown/Multiple
   Os:  Unknown/Multiple  |  
--+-
Changes (by simonpj):

  * difficulty:  = Unknown

Comment:

 I think the reason for 'mdo' was by analogy with 'let' and 'where': just
 say use recursion and let the compiler sort out the details.  I have
 forgotten whether the same choice could be made for arrows, or whether
 'rec' is essential there.

 I don't feel strongly about this.  I suppose we could do any of these:
   * Remove 'rec' altogether (including from arrows i.e. 'proc')
   * Remove 'mdo' and use 'do rec' instead
   * Allow 'rec' in 'do' as well as in 'proc'
   * Status quo ('rec' in 'proc' but not in 'do')

 Simon

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2798#comment:2
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #2798: Enable rec keyword when RecursiveDo is enabled?

2008-11-22 Thread GHC
#2798: Enable rec keyword when RecursiveDo is enabled?
-+--
Reporter:  nominolo  |Owner:  
Type:  task  |   Status:  new 
Priority:  normal|Milestone:  
   Component:  Compiler  |  Version:  6.11
Severity:  minor |   Resolution:  
Keywords:| Testcase:  
Architecture:  Unknown/Multiple  |   Os:  Unknown/Multiple
-+--
Comment (by ross):

 The idea of rec was to use it with plain do, to indicate feedback
 explicitly as an alternative to using mdo.  Many users of arrow notation
 prefer to do that.  As you say, it's not much use together with mdo.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2798#comment:1
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs