[GHC] #7828: RebindableSyntax and Arrow

GHC ghc-devs at haskell.org
Tue Jun 10 18:45:49 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 ross):

 Replying to [comment:22 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?

 That's right.  If a variable is used by both `c` and `ss`, it will be in
 both sets.

 > 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?

 Things are added to the stack by `HsCmdApp` and removed with `HsCmdLam`,
 but stacks can also be modified by `HsCmdArrForm` - there are some
 examples in the "Primitive constructs" section in teh arrow notation part
 of the GHC User's Guide.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7828#comment:23>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list