#3968: DoRec not supported, but RecursiveDo deprecated
------------------------+---------------------------------------------------
    Reporter:  m4dc4p   |       Owner:                           
        Type:  bug      |      Status:  new                      
    Priority:  normal   |   Component:  Compiler                 
     Version:  6.12.1   |    Keywords:                           
          Os:  Windows  |    Testcase:                           
Architecture:  x86      |     Failure:  GHC rejects valid program
------------------------+---------------------------------------------------
 GHC 6.12.1 reports that the !RecursiveDo pragma has been deprecated in
 favor of !DoRec. However, !DoRec has two problems:

   * Not supported by GHC
   * Not defined in Cabal's Language.Haskell.Extension.Extension data type.

 When compiling with -XRecursiveDo, a warning is issued.

 When compiling with -XDoRec, the mdo syntax is not recognized. You get
 "Not in scope: `mdo'" or "parse error on input `<-'".

 It doesn't seem to matter if the commmand line flag or LANGUAGE pragma is
 used.

 The following shows the results of compiling the attached file with the
 two flags:

 {{{
 >ghc --version
 The Glorious Glasgow Haskell Compilation System, version 6.12.1

 >ghc -c -fforce-recomp -XRecursiveDo DoRec.hs

 on the commandline:
     Warning: -XRecursiveDo is deprecated: use -XDoRec or pragma {-#
 LANGUAGE DoRec #-} instead

 >ghc -c -fforce-recomp -XDoRec DoRec.hs

 DoRec.hs:5:8: Not in scope: `mdo'
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3968>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to