[GHC] #16152: Core lint error from PartialTypeSignatures
GHC
ghc-devs at haskell.org
Tue Jan 8 19:24:49 UTC 2019
#16152: Core lint error from PartialTypeSignatures
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.7
Keywords: | Operating System: Unknown/Multiple
PartialTypeSignatures |
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
{{{#!hs
{-# Language PartialTypeSignatures #-}
{-# Language PolyKinds #-}
{-# Language ScopedTypeVariables #-}
{-# Options_GHC -dcore-lint #-}
top :: forall f. _
top = undefined where
x :: forall a. f a
x = undefined
}}}
causes Core lint errors:
{{{
$ ~/../inplace/bin/ghc-stage2 --interactive -ignore-dot-ghci 922_bug.hs
GHCi, version 8.7.20181230: https://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( 922_bug.hs, interpreted )
*** Core Lint errors : in result of Desugar (before optimization) ***
<no location info>: warning:
In the type ‘forall (f :: k_a1z6 -> *) w. w’
@ k_a1z6 is out of scope
*** Offending Program ***
Rec {
$trModule :: Module
[LclIdX]
$trModule = Module (TrNameS "main"#) (TrNameS "Main"#)
top :: forall (f :: k_a1z6 -> *) w. w
[LclIdX]
top
= \ (@ (f_a2BY :: k_a1z6 -> *)) (@ w_a2BZ) ->
(\ (@ k_a1z6) (@ (f_a1yV :: k_a1z6 -> *)) (@ w_a1yN) ->
let {
$dIP_a2BO :: ?callStack::CallStack
[LclId]
$dIP_a2BO
= emptyCallStack
`cast` (Sym (N:IP[0] <"callStack">_N <CallStack>_N)
:: CallStack ~R# (?callStack::CallStack)) } in
let {
$dIP_a2BD :: HasCallStack
[LclId]
$dIP_a2BD
= (pushCallStack
(unpackCString# "undefined"#,
SrcLoc
(unpackCString# "main"#)
(unpackCString# "Main"#)
(unpackCString# "922_bug.hs"#)
(I# 8#)
(I# 7#)
(I# 8#)
(I# 16#))
($dIP_a2BO
`cast` (N:IP[0] <"callStack">_N <CallStack>_N
:: (?callStack::CallStack) ~R# CallStack)))
`cast` (Sym (N:IP[0] <"callStack">_N <CallStack>_N)
:: CallStack ~R# (?callStack::CallStack)) } in
letrec {
top_a1yW :: w_a1yN
[LclId]
top_a1yW
= letrec {
x_a1yv :: forall (a :: k_a1z6). f_a1yV a
[LclId]
x_a1yv
= \ (@ (a_a1zd :: k_a1z6)) ->
let {
$dIP_a2BP :: ?callStack::CallStack
[LclId]
$dIP_a2BP
= emptyCallStack
`cast` (Sym (N:IP[0] <"callStack">_N
<CallStack>_N)
:: CallStack ~R#
(?callStack::CallStack)) } in
let {
$dIP_a2Bz :: HasCallStack
[LclId]
$dIP_a2Bz
= (pushCallStack
(unpackCString# "undefined"#,
SrcLoc
(unpackCString# "main"#)
(unpackCString# "Main"#)
(unpackCString# "922_bug.hs"#)
(I# 11#)
(I# 7#)
(I# 11#)
(I# 16#))
($dIP_a2BP
`cast` (N:IP[0] <"callStack">_N
<CallStack>_N
:: (?callStack::CallStack) ~R#
CallStack)))
`cast` (Sym (N:IP[0] <"callStack">_N
<CallStack>_N)
:: CallStack ~R#
(?callStack::CallStack)) } in
break<0>() undefined @ 'LiftedRep @ (f_a1yV a_a1zd)
$dIP_a2Bz; } in
break<1>() undefined @ 'LiftedRep @ w_a1yN $dIP_a2BD; } in
top_a1yW)
@ Any @ Any @ w_a2BZ
end Rec }
*** End of Offense ***
<no location info>: error:
Compilation had errors
*** Exception: ExitFailure 1
>
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16152>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list