[GHC] #15648: Core Lint error with source-level unboxed equality
GHC
ghc-devs at haskell.org
Mon Oct 1 03:05:51 UTC 2018
#15648: Core Lint error with source-level unboxed equality
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.4.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: #15209 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
I worry a malicious user of TH might get around the `checkValidType`
check.
Why do we need
* If `x :: t1 ~# t2`, then `x` is a `CoVar`
? We clearly need the other direction of implication (that all `CoVar`s
have coercion types), but I don't see the harm in allowing non-`CoVar`s to
have coercion types. They'd be useless, but also harmless, I think.
I wonder if there is just some code that looks at an `Id`'s type to
determine whether it's a coercion variable instead of checking `isCoVar`.
This might be from the fact that `CoVar`'s distinguished nature in
`IdDetails` is a relatively new innovation. It used to be that looking at
the type was the only way to tell coercion variables from others.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15648#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list