Fix #14390 by making toIfaceTyCon aware of equality
authorRyan Scott <ryan.gl.scott@gmail.com>
Mon, 30 Oct 2017 00:48:19 +0000 (20:48 -0400)
committerBen Gamari <ben@smart-cactus.org>
Mon, 30 Oct 2017 01:51:05 +0000 (21:51 -0400)
commit85aa1f4253163985fe07d172f8da73b784bb7b4b
treead42e09d5d24a4d8e199ab35b34f29ef4190a3d4
parent7673561555ae354fd9eed8de1e57c681906e2d49
Fix #14390 by making toIfaceTyCon aware of equality

GHC was panicking when pretty-printing a heterogeneous
equality type constructor (#14390) because the function which
produced the type constructor, `toIfaceTyCon`, wasn't attaching the
appropriate `IfaceTyConSort` for equality type constructors, which
is `IfaceEqualityTyCon`. This is fixed easily enough.

Test Plan: make test TEST=T14390

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie

GHC Trac Issues: #14390

Differential Revision: https://phabricator.haskell.org/D4132
compiler/iface/ToIface.hs
testsuite/tests/typecheck/should_fail/T14390.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T14390.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T