[GHC] #14119: Refactor type patterns

GHC ghc-devs at haskell.org
Thu Nov 9 19:49:13 UTC 2017


#14119: Refactor type patterns
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:  goldfire
            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):

 Conor McBride suggested to Simon today that we could usefully include lots
 of casts in patterns -- indeed, perhaps we should allow a cast essentially
 at all points in the pattern grammar. These casts would all be casts by a
 variable. Then, when matching, if the target has no cast at that spot, the
 variable is matched with Refl.

 This approach has the downside of producing big substitutions (with lots
 of type variables and coercion variables), but it has the upside of likely
 working.

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


More information about the ghc-tickets mailing list