
#12465: Evil idea: Allow empty record field update syntax for types. -------------------------------------+------------------------------------- Reporter: Iceland_jack | 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 goldfire): I would love to see full support for record-like syntax at the type level. This would be (almost) forward-compatible with such an idea. I like it, with one exception: empty braces always always mean that the type is fully applied. If you wish for it to be partially applied, then use underscores. The (almost) part above is that you mean the type `Vector {}` to have a subtly different meaning than an expression `MkRec {}`. In the former, you wish for GHC to infer the values for the arguments. In the latter, you wish for GHC to use `undefined`. In some future world where we can sometimes infer the value of term-level arguments (because we have dependent types), perhaps we can have `MkRec {}` mean "infer arguments where possible, otherwise use `undefined`". Such an interpretation of `MkRec {}` seems fully backward-compatible, for two reasons: (1) no term- level arguments can be inferred today, and (2) even if they could, we would simply be making a term-level value be more defined, which can't hurt the semantics of a program. So I, for one, support this move. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12465#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler