Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal error when using raw ctl with named handler #484

Open
hflsmax opened this issue Apr 5, 2024 · 0 comments
Open

Internal error when using raw ctl with named handler #484

hflsmax opened this issue Apr 5, 2024 · 0 comments

Comments

@hflsmax
Copy link

hflsmax commented Apr 5, 2024

I encounter an internal error when using koka 3.1.1

module main

named rec effect get
  ctl get(): ()

pub fun main()
  with r <- named handler
    raw ctl get()
      ()
  ()
> koka -O3 -v0 -o main main.kk
main(1, 1): internal error: label has not kind X: (TCon (TypeCon {typeconName = main/get, typeconKind = KApp (KApp (KCon (->)) (KCon E)) (KApp (KApp (KCon (->)) (KCon V)) (KCon V))}),TVar (TypeVar {typevarId = 196, typevarKind = KCon E, typevarFlavour = Meta}))
CallStack (from HasCallStack):
  error, called at src/Common/Failure.hs:46:12 in koka-3.1.1-BaWBegw2eC62R9E4dpMHh4:Common.Failure
  raise, called at src/Common/Failure.hs:32:5 in koka-3.1.1-BaWBegw2eC62R9E4dpMHh4:Common.Failure
  failure, called at src/Common/Failure.hs:28:11 in koka-3.1.1-BaWBegw2eC62R9E4dpMHh4:Common.Failure
  assertion, called at src/Type/Type.hs:744:5 in koka-3.1.1-BaWBegw2eC62R9E4dpMHh4:Type.Type
  appEffectExtend, called at src/Type/Type.hs:679:14 in koka-3.1.1-BaWBegw2eC62R9E4dpMHh4:Type.Type
  effectExtend, called at src/Type/Infer.hs:1098:57 in koka-3.1.1-BaWBegw2eC62R9E4dpMHh4:Type.Infer

Failed to compile main.kk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants