[GHC] #7828: RebindableSyntax and Arrow

GHC ghc-devs at haskell.org
Mon Jun 16 21:59:41 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:  #1537,
                                              |  #3613
----------------------------------------------+----------------------------

Comment (by ross):

 Replying to [comment:27 jstolarek]:
 > > Why not follow Ross's suggestions in comment 17?
 >
 > If I understand correctly Ross' proposal is actually independent of this
 ticket: we could implement it and still have broken RebindableSyntax.
 That's why I chose to fix the rebindable syntax first. Perhaps then we can
 think about alternative desugaring of arrow syntax.

 It's not so much an alternative desugaring as a different view of the
 existing desugaring in which `do` and `if` can be rebound in an analogous
 manner to the way they're rebound in the expression world.  Or it's a re-
 interpretation of this ticket: instead of using private versions of `arr`,
 `>>>` and `first`, the idea is to use private versions of the control
 operators `bind`, `bind_` and `ifThenElseA`, the arrow counterparts of
 `>>=`, `>>` and `ifThenElse`.  I don't see how the former can work, as
 each language construct is translated to several of those combinators.  In
 addition, you have less control of the types of these things, because the
 translation re-arranges and trims the environment it passes through the
 arrow.

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


More information about the ghc-tickets mailing list