[GHC] #3380: [Patch] Support implicit concatenation in list
comprehensions
GHC
trac at galois.com
Sat Jul 18 06:22:02 EDT 2009
#3380: [Patch] Support implicit concatenation in list comprehensions
------------------------------+---------------------------------------------
Reporter: batterseapower | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.4
Severity: normal | Resolution:
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
------------------------------+---------------------------------------------
Comment (by batterseapower):
NB: this generalises to instances of MonadPlus, but I can't think of a
nice-looking syntax.
{{{
[e1, e2 | qs]
= concat [[e1, e2] | qs]
= join [return e1 `mplus` return e2 | qs]
}}}
This is pretty easy to implement as long as you can come up with the
syntax.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3380#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list