Opened 18 months ago

Last modified 13 months ago

#15433 new bug

Internal error with PartialTypeSignatures and TH

Reported by: monoidal Owned by:
Priority: normal Milestone: 8.10.1
Component: Template Haskell Version: 8.4.3
Keywords: PartialTypeSignatures Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:



{-# LANGUAGE TemplateHaskell #-}
type T = $([t| _ |])

gives a bad error message in 8.4 and HEAD:

    • GHC internal error: ‘_’ is not in scope during type checking, but it passed the renamer
      tcl_env of environment: [r1sn :-> ATcTyCon T :: k0]
    • In the type ‘(_)’
      In the type declaration for ‘T’

Change History (5)

comment:1 Changed 18 months ago by goldfire

Component: CompilerTemplate Haskell

comment:2 Changed 18 months ago by RyanGlScott

Indeed, the renamer normally catches things like type T = _, so the typechecker never has a chance to get its claws on it. This same phenomenon can also be observed in other places where wildcards are disallowed (for example, instance C (Maybe $([t| _ |])) also gives the same internal error).

comment:3 Changed 18 months ago by simonpj

Keywords: PartialTypeSignatures added

comment:4 Changed 18 months ago by bgamari


These won't be fixed for in GHC 8.6.

comment:5 Changed 13 months ago by osa1


Bumping milestones of low-priority tickets.

Note: See TracTickets for help on using tickets.