#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):
Hmmm, I found one more strange bug. Maybe you could help me understanding
it, I can't really see why/where it happens.
The error occurs when I try to load a .hs file with one single grouping
statement in ghci:
{{{
{-# LANGUAGE MonadComprehensions #-}
foo = [ a | a <- [5], then group by a ] :: [[Int]]
}}}
The error message itself is pretty long, so I posted it on a pastebin:
http://npaste.de/y9/
The strange thing is, that I can compile that file just fine (after adding
a `main = print foo`) and it passes the core validation `-dcore-lint`. I
can also define that statement directly in ghci:
{{{
Prelude> :set -XMonadComprehensions
Prelude> let foo = [ x | x <- [5], then group by x ]
Prelude> foo
[[5]]
}}}
But for some reason, I can not load it from a file. All other statements
work as expected, and as far as I can tell I haven't touched any ghci
code. At least none that should be somehow special for grouping
statements.
If it is of any help, I posted a diff of my current changes on my
pastebin: http://npaste.de/yB/
This diff won't apply to current HEAD, and it's not final at all. Just to
give you a quick summary of what I've done so far.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4370#comment:37>
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