[GHC] #3306: Improve syntax for GADT + records
GHC
trac at galois.com
Wed Jun 17 12:59:35 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 isaacdupree):
Who implements GHC's version of the syntax currently? GHC and haskell-src-
exts, I guess. Both well-maintained.
If we choose (B), I guess the current GADT-records syntax can/should be
kept with a 'deprecated' warning for a few releases?
(A) reminds me a little too much of how C tried to make declarations and
uses look the same (e.g. function-pointers) and ended up with something
nearly incomprehensible!
With (A) and (B), I have a silly question.
{{{
data Silly a where
Silly :: a -> forall b. b -> Silly a
(which would parse like
Silly :: a -> (forall b. b -> Silly a)
)
}}}
Is that allowed or useful? (interacts with impredicativity, IIRC)...
Because neither records syntax allows you even to attempt that.
-Isaac
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3306#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list