
#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 RyanGlScott): Good news—the original program is now rejected: {{{ $ ~/Software/ghc/inplace/bin/ghc-stage2 Bug.hs[1 of 2] Compiling Foo ( Foo.hs, Foo.o ) [2 of 2] Compiling Bug ( Bug.hs, Bug.o ) Bug.hs:23:21: error: • Couldn't match type ‘(a0 ~ b0) -> JankyEquality a0 b0’ with ‘JankyEquality a a’ Expected type: JankyEquality a b Actual type: (a0 ~ b0) -> JankyEquality a0 b0 • Probable cause: ‘Jank’ is applied to too few arguments In the expression: Jank In an equation for ‘legitToJank’: legitToJank Legit = Jank • Relevant bindings include legitToJank :: LegitEquality a b -> JankyEquality a b (bound at Bug.hs:23:1) | 23 | legitToJank Legit = Jank | ^^^^ Bug.hs:30:10: error: • Couldn't match expected type ‘(a ~ b) -> b ~ a’ with actual type ‘b ~ a’ • In the expression: unJank $ legitToJank $ mkLegit @b @a In an equation for ‘ueqSym’: ueqSym = unJank $ legitToJank $ mkLegit @b @a • Relevant bindings include ueqSym :: (a ~ b) -> b ~ a (bound at Bug.hs:30:1) | 30 | ueqSym = unJank $ legitToJank $ mkLegit @b @a | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ }}} You can still use `$ueqT a b` as a visible argument to a function, but it appears to be functionally inert now, since you can't bring equalities into scope with it anymore (at least, not as far as I can tell). Should we claim victory on this ticket? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15648#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler