Opened 14 months ago

Last modified 9 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:

Description

File:

{-# 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 14 months ago by goldfire

Component: CompilerTemplate Haskell

comment:2 Changed 14 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 14 months ago by simonpj

Keywords: PartialTypeSignatures added

comment:4 Changed 14 months ago by bgamari

Milestone: 8.6.18.8.1

These won't be fixed for in GHC 8.6.

comment:5 Changed 9 months ago by osa1

Milestone: 8.8.18.10.1

Bumping milestones of low-priority tickets.

Note: See TracTickets for help on using tickets.