#11334: GHC panic when calling typeOf on a promoted data constructor -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc1 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1757 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"65b810bdda625f2e98069c2c56ec93e1c65667a6/ghc" 65b810b/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="65b810bdda625f2e98069c2c56ec93e1c65667a6" Show TYPE 'Lifted/TYPE 'Unlifted as */# in Show TypeRep instance Kind equalities changed how `*`/`#` are represented internally, which means that showing a `TypeRep` that contains either of those kinds produces a rather gross-looking result, e.g., ```
typeOf (Proxy :: Proxy 'Just) Proxy (TYPE 'Lifted -> Maybe (TYPE 'Lifted)) 'Just
We can at least special-case the `Show` instance for `TypeRep` so that
it prints `*` to represent `TYPE 'Lifted` and `#` to represent `TYPE
'Unlifted`.
Addresses one of the issues uncovered in #11334.
Test Plan: ./validate
Reviewers: simonpj, hvr, austin, goldfire, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1757
GHC Trac Issues: #11334
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11334#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler