[GHC] #12159: Record-like GADTs with repeated fields (of same type) rejected
GHC
ghc-devs at haskell.org
Tue Jun 7 07:25:44 UTC 2016
#12159: Record-like GADTs with repeated fields (of same type) rejected
-------------------------------------+-------------------------------------
Reporter: heisenbug | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by adamgundry):
* cc: adamgundry (added)
* type: bug => feature request
Comment:
It probably wouldn't be difficult to generate selector functions in cases
like this, but record updates are likely to be tricky, because of cases
like this:
{{{#!hs
data Foo p where
Bar :: { quux :: a } -> Foo a
Baz :: { quux :: a } -> Foo [a]
}}}
Record updates are already quite tricky to type-check. We'd need a clear
specification of what should be accepted (see also #2595).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12159#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list