#836: rebindable if-then-else syntax
----------------------------------+-----------------------------------------
Reporter: nibro | Owner: igloo
Type: feature request | Status: patch
Priority: normal | Milestone: _|_
Component: Compiler (Parser) | Version: 6.13
Keywords: | Testcase: N/A
Blockedby: | Difficulty: Unknown
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
----------------------------------+-----------------------------------------
Changes (by simonpj):
* owner: SamAnklesaria => igloo
Comment:
Thank you. I have reviewed, modified somewhat, and pushed.
Main modifications were
* Take advantage of the `Nothing` in `HsIf` to avoid having to consult
the options flags
* Use `RebindableSyntax` flag for all rebindable syntax
* Add documentation
The patches are these
{{{
Fri Oct 22 07:34:00 PDT 2010 [email protected]
* Add rebindable syntax for if-then-else
There are two main changes
* New LANGUAGE option RebindableSyntax, which implies NoImplicitPrelude
* if-the-else becomes rebindable, with function name "ifThenElse"
(but case expressions are unaffected)
Thanks to Sam Anklesaria for doing most of the work here
M ./compiler/cmm/CmmParse.y -2 +2
M ./compiler/deSugar/Coverage.lhs -2 +2
M ./compiler/deSugar/DsArrows.lhs -9 +15
M ./compiler/deSugar/DsExpr.lhs -2 +8
M ./compiler/deSugar/DsMeta.hs -2 +2
M ./compiler/deSugar/Match.lhs -1 +1
M ./compiler/hsSyn/Convert.lhs -2 +2
M ./compiler/hsSyn/HsExpr.lhs -8 +19
M ./compiler/hsSyn/HsUtils.lhs -2 +5
M ./compiler/main/DynFlags.hs +4
M ./compiler/parser/Parser.y.pp -1 +1
M ./compiler/rename/RnEnv.lhs -5 +5
M ./compiler/rename/RnExpr.lhs -8 +12
M ./compiler/rename/RnNames.lhs -1 +1
M ./compiler/typecheck/Inst.lhs -2 +2
M ./compiler/typecheck/TcArrows.lhs -6 +12
M ./compiler/typecheck/TcExpr.lhs -5 +15
M ./compiler/typecheck/TcHsSyn.lhs -9 +7
M ./compiler/typecheck/TcRnTypes.lhs +2
M ./docs/users_guide/flags.xml +6
M ./docs/users_guide/glasgow_exts.xml -2 +10
-- base package
Fri Oct 22 07:31:57 PDT 2010 [email protected]
* Remove redundant imports, now that NoImplicitPrelude does not imply
RebindableSyntax
M ./Control/OldException.hs -1
M ./Data/Dynamic.hs -1
M ./Data/Typeable.hs -1 +1
M ./Foreign/Marshal/Alloc.hs -1
M ./GHC/Conc/IO.hs -1
M ./GHC/Conc/Signal.hs -1
M ./GHC/Conc/Sync.lhs -1
M ./GHC/ForeignPtr.hs -1
M ./GHC/IO/Handle/FD.hs -1
M ./GHC/Pack.lhs -1
M ./GHC/ST.lhs -1
M ./GHC/Unicode.hs -1
M ./System/Event/Control.hs -1
M ./System/Event/Manager.hs -1 +1
M ./System/Timeout.hs -1
-- testsuite
Fri Oct 22 07:30:53 PDT 2010 [email protected]
* Use the RebindableSyntax flag, not NoImplicitPrelude
M ./tests/ghc-regress/rebindable/DoParamM.hs -1 +1
M ./tests/ghc-regress/rebindable/DoRestrictedM.hs -1 +1
M ./tests/ghc-regress/rebindable/T303.hs -1 +1
M ./tests/ghc-regress/rebindable/rebindable1.hs -1 +1
M ./tests/ghc-regress/rebindable/rebindable2.hs -1 +1
M ./tests/ghc-regress/rebindable/rebindable3.hs -1 +1
M ./tests/ghc-regress/rebindable/rebindable4.hs -1 +1
M ./tests/ghc-regress/rebindable/rebindable5.hs -1 +1
M ./tests/ghc-regress/rebindable/rebindable6.hs -1 +1
M ./tests/ghc-regress/rebindable/rebindable7.hs -1 +1
M ./tests/ghc-regress/rebindable/rebindable8.hs -1 +1
M ./tests/ghc-regress/rebindable/rebindable9.hs -1 +1
Thu Oct 21 15:06:35 PDT 2010 [email protected]
* trac #836 tests
M ./tests/ghc-regress/rebindable/all.T +1
A ./tests/ghc-regress/rebindable/rebindable10.hs
A ./tests/ghc-regress/rebindable/rebindable10.stdout
}}}
I'm agnostic about whether to slip this into 7.0
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/836#comment:31>
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