Ticket #4009 (closed feature request: invalid)
can newtype be extended to permit GADT-like declarations
| Reported by: | nr | Owned by: | simonpj |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.0.1 |
| Component: | Compiler (Type checker) | Version: | 6.12.1 |
| Keywords: | newtype GADT | Cc: | |
| Operating System: | Linux | Architecture: | x86 |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
I'd like to create the following value constructor without the overhead of data:
data B n e x where B :: Body n -> B n C C
However, if I ask for newtype instead of data I'm told that a newtype constructor must have a return type of form T a1 ... an. Is this restriction fundamental? If not, could it be possible to allow GADT-like declarations for newtype?
Change History
Note: See
TracTickets for help on using
tickets.
