[GHC] #7828: RebindableSyntax and Arrow
GHC
ghc-devs at haskell.org
Tue Jun 10 10:59:34 UTC 2014
#7828: RebindableSyntax and Arrow
----------------------------------------------+----------------------------
Reporter: AlessandroVermeulen | Owner:
Type: bug | jstolarek
Priority: normal | Status: new
Component: Compiler (Type checker) | Milestone: 7.10.1
Resolution: | Version: 7.6.2
Operating System: Unknown/Multiple | Keywords:
Type of failure: GHC rejects valid program | Architecture:
Test Case: | Unknown/Multiple
Blocking: | Difficulty: Unknown
| Blocked By:
| Related Tickets:
----------------------------------------------+----------------------------
Comment (by jstolarek):
> They are subsets of xs: xs1 is the variables used by c, while xs2 is the
> variables used by ss but not bound in p. So the command 'c' gets local
> environment xs1 and stack (). The translations of statements are arrows
that
> take an environment (here xs2) as input.
That starts to make sense :-) As I understand `x1` and `x2` need not be
disjoint - is that correct?
I am yet to understand the rules for encoding the input parameters to the
arrows.
Is there a general rule that says when and in what order things are put on
the stack?
Is it the case that elements on the stack are never accessed and need to
be popped
if they are to be used?
I know all of this could be deduced from the source code, but sadly this
is not
straightforward (at least for me).
> I don't understand that question - I don't see a bind expression in the
generated code.
What I meant is that desugaring of arrow bind is completely different from
monadic bind (which is desugared to `>>=`+lambda) so perhaps it deserves
its own internal representation. But in fact this is what my prototype
implements ie. it distingushes arrow and monadic bind.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7828#comment:22>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list