#4148: improve new recursive do syntax
---------------------------------+------------------------------------------
Reporter: guest | Owner:
Type: feature request | Status: new
Priority: low | Milestone: 7.6.1
Component: Compiler | Version: 6.12.3
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by jvl):
With repsect to the current discussion, just a bit of background: I was
the
person you initiated this particular request. I was motivated to do so
because
the transition from the old to the new (now current) syntax was awkward,
i.e. to
use the new syntax one had to introduce returns into the code, that were
to all intents and purposes redundant. i.e. the new syntax was not
a drop in replacement (from a syntactic) perspective. I was not concerned
about the segmentation issue.
However, after my initialy post, Ross Paterson introduced the issues with
respect to
segmentation. Which introduced a requirement for two cases:
- automatic segmentation
- programmer control of segmentation
I have nothing against proposal B, which indeed satisfies the above
two requirements, and the original requirement
- simple syntax for mdo
however, for the sake of completeness, I'd like to point out
that my original proposal (see comment 2 years ago) incorporated
all these requirements as well.
{{{
mdo rec rec
(with without with
segmentation) segmentation segmentation What
------------------------------------------------------
- YES YES (E) jvl prosal
}}}
the two cases destinguised by the syntax, where
{{{
do rec
...
...
}}}
would be segmented (note the above case is syntactically
distinct, from that below, see original discussion), and
{{{
do
rec ...
...
return
}}}
would not be segmented.
Perhaps this would cause confusion, and two distinct keywords is better.
Just wanted to include this for completeness.
John.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4148#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