#5429: Docase notation as GHC extension
---------------------------------+------------------------------------------
Reporter: tomasp | Owner: tomasp
Type: feature request | Status: new
Priority: normal | Component: Compiler
Version: | Keywords: monad, syntactic sugar, mzip,
comprehensions
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Changes (by tomasp):
* owner: => tomasp
Comment:
The prototype implementation of the extension (started at Cambridge
Hackathon 2 weeks ago) can be found in my forked GitHub repository:
* The compiler
extension:[[br]]http://github.com/tpetricek/Haskell.Extensions/commits
* A few additions to the base library:
http://github.com/tpetricek/Haskell.Extensions.Base/commits
I believe that the implementation is reasonably modular and does not
affect the rest of GHC in any unexpected ways. It adds a single new case
`HsDocase` to the expression syntax. It is implemented as an extension
(can be turned on using `:set -XDocaseNotation`). The syntax in parser
duplicates parts of the syntax for `case` (to allow additional `?` pseudo-
pattern without affecting the rest of the language). More complex routines
are implemented in two additional modules (`TcDocase` and `DsDocase`).
The patch is not yet complete. At the moment, I'm aware of the following
limitations:
* The documentation for `docase` in the `docs` folder is missing.
* The tests for the `docase` notation are missing.
* I need to review the code to make sure everything is well documented.
If anybody can review the code and give some additional feedback, that
would be highly appreciated. I published the patch on GitHub, because I
wasn't sure what is the best practice (the wiki page that describes
working with Git is a bit incomplete
http://hackage.haskell.org/trac/ghc/wiki/WorkingConventions/Git)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5429#comment:1>
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