Ticket #3968 (closed bug: fixed)
DoRec not supported, but RecursiveDo deprecated
| Reported by: | m4dc4p | Owned by: | igloo |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.12.3 |
| Component: | Compiler | Version: | 6.12.1 |
| Keywords: | Cc: | ||
| Operating System: | Windows | Architecture: | x86 |
| Type of failure: | GHC rejects valid program | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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'
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

