[GHC] #7495: generalizing overloaded list syntax to Sized Lists, HLists, HRecords, etc

GHC ghc-devs at haskell.org
Wed Jun 10 07:26:05 UTC 2015


#7495: generalizing overloaded list syntax to Sized Lists, HLists, HRecords, etc
-------------------------------------+-------------------------------------
        Reporter:  nwf               |                   Owner:  carter
            Type:  feature request   |                  Status:  new
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.6.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:  #9883             |                Blocking:  9883
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by s9gf4ult):

 Your example is much more complex, why so many parameters in `HetCons` and
 functional dependencies?

 Pattern matching overload is interesting idea. Pattern `(x:xs)` should be
 considered by compiler as `HCons x xs` for `HList`, but compiler knowns
 about `HList` just after type inference and see pattern `(x:xs)` after
 parsing and desugaring, so pattern `(x:xs)` must be replaced with `HCons x
 xs` after type inference somehow. I am not very familiar with GHC
 internals anyway.

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


More information about the ghc-tickets mailing list