[GHC] #14119: Refactor type patterns
GHC
ghc-devs at haskell.org
Sat Aug 19 02:24:01 UTC 2017
#14119: Refactor type patterns
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1
Resolution: | Keywords: TypeInType
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking: 12564, 13910,
| 13938, 14038
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
It's true that there's no counterpart to `Expr`, but perhaps there could
be. The problem is that it wouldn't pay its way: the only real usage for
the pattern type would be in RULEs. In types, though, patterns come up
more often, perhaps tilting the needle enough.
Another way of examining this: pattern-matches in terms are elaborately
desugared into nested cases. If they weren't, the case for an expression-
level pattern type would be stronger. And in types, we don't do this
desugaring.
On the other hand, there is my sentiment in comment:1. I don't think I'd
argue with "Well, that's a good idea, but not worth it since we'll be
doing much heavier refactoring soon, anyway."
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14119#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list