#4370: Bring back monad comprehensions
---------------------------------+------------------------------------------
Reporter: simonpj | Owner: nsch
Type: feature request | Status: new
Priority: normal | Milestone: 7.2.1
Component: Compiler | Version: 6.12.3
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by nsch):
A note on my comment above:
I would prefer to use the `MonadComp` context to store the `return`
function instead of the `HsDo` expression. But unfortunately the
`HsStmtContext` in the `HsDo` expression has the argument `Name` instead
of `id`. This makes it impossible to lookup/typecheck/desugar `return`
correctly, since all those steps require different types. However,
changing this type from `Name` to the more general `id` requires a *lot*
of changes everywhere in the code - and I'm not sure if that's worth it.
In fact, it requires so many changes that I'd suggest to open a separate
ticket if you really want us to put that `return` function into the
`MonadComp` context instead of the `HsDo` expression.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4370#comment:23>
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