
#12618: Add saturated constructor applications to Core -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Let's not go overboard here! This ticket is ''only'' about treating '''saturated''' applications of '''data constructors''' specially. There are two more ambitious possible * Try to suppress more type arguments, for situations other than saturated data constructors. If you are interested in that, please read [https://www.microsoft.com/en-us/research/publication/scrap-your-type- applications/ Scrap your type applications]. By all means come up with a better scheme, but that paper describes the best one I know. * Introduce uncurried application as a Core primitive (and eliminate `App`). For that we'd want uncurried lambda as well (the intro form). Please read [https://www.microsoft.com/en-us/research/publication/types- are-calling-conventions/ Types are calling conventions]. I talked with Stephanie and Joachim about this at ICFP, and I think Joachim is going to follow it up. It too involves complications (notably abstraction must be over a telescope), and we had an alternative idea with "computation types". More on that anon, doubtless. By all means start new tickets to discuss these generalisations. But ''this'' ticket is just about the intro-form that is dual to `case`, namely saturated constructor application. If we discuss the (much more ambitious) generalisations here, the payload of this ticket will get buried. (One reason for NOT adopting `ConApp` is that it might ultimately be subsumed by the more general cases. But I'm not holding my breath.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12618#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler