[GHC] #7828: RebindableSyntax and Arrow

GHC ghc-devs at haskell.org
Wed Jun 18 08:21:09 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 simonpj):

 I'm not following all of this, but my instinct is this.  The semantics of
 the program should not depend on the details of desugaring.  So the
 various calls to `arr`, `(>>>)` in the desugarer should not dispatch to
 different instances depending on the size of the tuple.  So the type
 checker should be able to construct functions `arr-at-T`, `(>>>)-at-T`
 (for the ambient arrow T) ''that are polymorphic in the environment
 argument''.

 The desugarer can then instantiate this polymorphic function at whatever
 types it needs (maybe several of them).

 I am having trouble getting to grips with this because I know of no
 document that gives:
  * The syntax of the arrow sub-language (including comprehensions)
  * The typing rules for that language
  * The desugaring for that language

 Having such a document would be extremely helpful in making sure we were
 all on staring from the same baseline.

 Simon

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


More information about the ghc-tickets mailing list