Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,866
    • Issues 4,866
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 455
    • Merge requests 455
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #16152
Closed
Open
Created Jan 08, 2019 by Icelandjack@IcelandjackReporter

Core lint error from PartialTypeSignatures

{-# 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
>
Trac metadata
Trac field Value
Version 8.7
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking