[GHC] #10843: Allow do blocks without dollar signs as arguments
GHC
ghc-devs at haskell.org
Thu Jun 2 13:19:04 UTC 2016
#10843: Allow do blocks without dollar signs as arguments
-------------------------------------+-------------------------------------
Reporter: agibiansky | Owner: agibiansky
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2
(Parser) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #11706 | Differential Rev(s): Phab:D1219
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Iceland_jack):
Examples from EDSL
[https://hackage.haskell.org/package/esqueleto-2.4.3/docs/Database-
Esqueleto.html Esqueleto]:
{{{#!hs
-- select $
-- from $ \p -> do
-- where_ (p ^. PersonName ==. val "John")
-- return p
select do
from \p -> do
where_ (p ^. PersonName ==. val "John")
return p
}}}
{{{#!hs
-- select $
-- from $ \person -> do
-- where_ $ exists $
-- from $ \post -> do
-- where_ (post ^. BlogPostAuthorId ==. person ^. PersonId)
-- return person
select do
from \person -> do
where_ do
exists do
from \post ->
where_ (post ^. BlogPostAuthorId ==. person ^. PersonId)
return person
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10843#comment:18>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list