[GHC] #16275: type hole in hs-boot file triggers GHC internal error
GHC
ghc-devs at haskell.org
Fri Feb 1 21:43:47 UTC 2019
#16275: type hole in hs-boot file triggers GHC internal error
-------------------------------------+-------------------------------------
Reporter: j.waldmann | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.3
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Put each line in a separate file, the last one is B.hs-boot
{{{
module A where { import {-# SOURCE #-} B }
module B where { }
module B where { data T a ; foo :: T _ }
}}}
then
{{{
$ ghci A.hs
GHCi, version 8.6.3: http://www.haskell.org/ghc/ :? for help
[1 of 3] Compiling B[boot] ( B.hs-boot, interpreted )
B.hs-boot:1:38: error:
• GHC internal error: ‘_’ is not in scope during type checking, but it
passed the renamer
tcl_env of environment: []
• In the first argument of ‘T’, namely ‘_’
In the type signature: foo :: T _
|
1 | module B where { data T a ; foo :: T _ }
| ^
}}}
I know the program is invalid (the hole has no valid instance) but still
it should not produce an internal error?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16275>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list