
#14498: GHC internal error: "not in scope during TC but it passed the renamer" -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.2.1 checker) | Keywords: Resolution: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: #14288 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): Here's a much simpler way to reproduce the bug, for debugging purposes: {{{#!hs {-# LANGUAGE PatternSynonyms, PolyKinds, ScopedTypeVariables #-} module Bug where import Data.Proxy pattern Foo :: forall (a :: j). () => forall (b :: k). () => Proxy a pattern Foo = (Proxy :: Proxy (b :: k)) }}} {{{ GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/rgscott/.ghci [1 of 1] Compiling Bug ( Bug.hs, interpreted ) Bug.hs:7:37: error: • GHC internal error: ‘k’ is not in scope during type checking, but it passed the renamer tcl_env of environment: [a1vz :-> Type variable ‘j’ = j, a1vB :-> Type variable ‘a’ = a, a1vD :-> Type variable ‘b’ = b] • In the kind ‘k’ In the first argument of ‘Proxy’, namely ‘(b :: k)’ In the type ‘Proxy (b :: k)’ | 7 | pattern Foo = (Proxy :: Proxy (b :: k)) | ^ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14498#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler