[GHC] #3306: Improve syntax for GADT + records
GHC
trac at galois.com
Mon Jul 6 14:10:04 EDT 2009
#3306: Improve syntax for GADT + records
---------------------------------+------------------------------------------
Reporter: simonpj | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.2
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
---------------------------------+------------------------------------------
Comment (by SamB):
I really don't like the way (B) implies the existance of record types --
unless you would like to add those too?
I am one of those who wants to see the current data type declaration
syntax die as soon as reasonably possible, i.e., in H'', and do not
approve of it's being used as a precedent for anything. In that light, I
don't think that (A) looks much like a repeat of C's mistake -- the part
to the left of the {{{::}}} is obviously supposed to be a term. The one
issue I have with (A) is the location of the context, and that doesn't
seem like a good enough reason to use (B) instead, unless we want to make
this possible too:
{{{
{ x::ty, y::ty } -> ty
}}}
I'll grant that even (B) isn't nearly as bad as what a context on an old-
style "data" declaration does, though.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3306#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list