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,865
    • Issues 4,865
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 461
    • Merge requests 461
  • 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
  • #19573
Closed
Open
Created Mar 21, 2021 by Icelandjack@IcelandjackReporter

Core Lint error: Non-*-like kind when *-like expected: * -> *

This triggers a Core Lint error: "Non-*-like kind when *-like expected: * -> *"

{-# Language RankNTypes #-}
{-# Options_GHC -dcore-lint #-}

import Data.Kind

-- type HoLim :: (k -> k1 -> Type) -> (k1 -> Type)
type HoLim f a = (forall x. f x) a

hoCone :: HoLim f b -> f a b
hoCone _ = undefined
$ ghci810b File.hs
GHCi, version 8.10.0.20191123: https://www.haskell.org/ghc/  :? for help
[1 of 1] Compiling Main             ( File.hs, interpreted )
*** Core Lint errors : in result of Desugar (before optimization) ***
File.hs:10:1: warning:
    Non-*-like kind when *-like expected: * -> *
    when checking the body of forall: forall x. f_aB2 x
    In the type of a binder: hoCone
    In the type ‘forall (f :: * -> * -> *) b a. HoLim f b -> f a b’
    Substitution: [TCvSubst
                     In scope: InScope {x_aB1 f_aB2 b_aB3 a_aB4 $trModule}
                     Type env: []
                     Co env: []]
*** Offending Program ***
Rec {
$trModule :: Module
[LclIdX]
$trModule = Module (TrNameS "main"#) (TrNameS "Main"#)

hoCone :: forall (f :: * -> * -> *) b a. HoLim f b -> f a b
[LclIdX]
hoCone
  = \ (@ (f_aBT :: * -> * -> *)) (@ b_aBU) (@ a_aBV) ->
      let {
        $dIP_a1nS :: ?callStack::CallStack
        [LclId]
        $dIP_a1nS
          = emptyCallStack
            `cast` (Sym (N:IP[0] <"callStack">_N <CallStack>_N)
                    :: CallStack ~R# (?callStack::CallStack)) } in
      let {
        $dIP_a1nM :: HasCallStack
        [LclId]
        $dIP_a1nM
          = (pushCallStack
               (unpackCString# "undefined"#,
                SrcLoc
                  (unpackCString# "main"#)
                  (unpackCString# "Main"#)
                  (unpackCString# "File.hs"#)
                  (I# 10#)
                  (I# 12#)
                  (I# 10#)
                  (I# 21#))
               ($dIP_a1nS
                `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
      \ (ds_d1ob :: HoLim f_aBT b_aBU) ->
        break<0>() undefined @ 'LiftedRep @ (f_aBT a_aBV b_aBU) $dIP_a1nM
end Rec }

*** End of Offense ***


<no location info>: error:
Compilation had errors


*** Exception: ExitFailure 1
>
``
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking