[GHC] #14119: Refactor type patterns

GHC ghc-devs at haskell.org
Tue Aug 15 18:53:15 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, 14038
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):

 * cc: RyanGlScott (added)


Comment:

 Silly question: are you proposing that we introduce a counterpart for
 `HsType` (from user syntax) for type patterns? A counterpart to `Type`
 (from Core) for type patterns? Both?

 If a counterpart for `HsType` is in the works, I think it would be a good
 idea for another reason. Currently, there are some niceties that term-
 level patterns provide which aren't available for type-level patterns,
 such as as-patterns (e.g., `x@(Just y)`). If we had a separate data
 type(s) for type patterns, it would be much easier to add support for this
 feature, since we would have a way to rule out the use of as-patterns in
 non-pattern types.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14119#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list