#15792: TH reification prints invisible arguments to rank-2-kinded type as visible -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.8.1 Component: Template Haskell | Version: 8.6.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5252 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ryan Scott <ryan.gl.scott@…>): In [changeset:"bfd93f90b6c63edf2790356e95feddf9898ec888/ghc" bfd93f9/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="bfd93f90b6c63edf2790356e95feddf9898ec888" Fix #15792 by not reifying invisible arguments in AppTys Summary: The `reifyType` function in `TcSplice` is carefully designed to avoid reifying visible arguments to `TyConApp`s. However, the same care was not given towards the `AppTy` case, which lead to #15792. This patch changes to the `AppTy` case of `reifyType` so that it consults the kind of the function type to determine which of the argument types are invisible (and therefore should be dropped) during reification. This required crafting a variant of `tyConArgFlags`, which I dubbed `appTyArgFlags`, that accept an arbitrary function `Type` instead of a `TyCon`. Test Plan: make test TEST=T15792 Reviewers: goldfire, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, carter GHC Trac Issues: #15792 Differential Revision: https://phabricator.haskell.org/D5252 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15792#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler