#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 simonpj):

 I think what you want the type checker to do is to give you a term,
 attached to the `GroupStmt` of type
 {{{
   imap :: forall a b. (a->b) -> m a -> m b
 }}}
 where `m` is the type of the monad.  Then you can instantiate this `imap`
 in the desugarer, with explicit applications, just as is done with plain
 `map` now.

 So the type checker need only produce '''one''' term, with the above type.
 That should not be hard.

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4370#comment:32>
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