[GHC] #14119: Refactor type patterns
GHC
ghc-devs at haskell.org
Thu Oct 12 10:16:45 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 simonpj):
While investigating #14270 I found that `SpecConstr` was generating rules
with massive coercions, like
{{{
RULE "SC:foo" f @(a |> <huge coercion expression>) arg1 arg2 = ...
}}}
Then I mis-read `Note [Matching in the presence of casts]` in `Unify`, and
thought that we simply discarded casts. So I had a go at replacing casts
in type patterns with a kind of placeholder `UnivCo`.
I now think this is probably all wrong, because I still don't
understanding of type patterns involving kind casts. But rather than
delete my changes entirely I'll attach them here for future reference.
The starting point was a new form of `UnivCoProvenance` to use in type
patterns; and a `TypePat` type in `Unify.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14119#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list