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 recursive effect #483

Open
hflsmax opened this issue Apr 4, 2024 · 1 comment
Open

Internal error when using recursive effect #483

hflsmax opened this issue Apr 4, 2024 · 1 comment

Comments

@hflsmax
Copy link

hflsmax commented Apr 4, 2024

The following program, when compiled with koka 3.1.1, produces an internal error

rec effect process
  fun yield(): ()
  fun fork(p: () -> <process> ()): ()
> koka -O3 -v0 -o main main.kk
main(1, 1): internal error: label has not kind X: (TCon (TypeCon {typeconName = main/process, typeconKind = KApp (KApp (KCon (->)) (KCon E)) (KApp (KApp (KCon (->)) (KCon V)) (KCon V))}),TCon (TypeCon {typeconName = std/core/types/total, typeconKind = KCon E}))
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/Type.hs:562:14 in koka-3.1.1-BaWBegw2eC62R9E4dpMHh4:Type.Type

Failed to compile main.kk
@jasigal
Copy link

jasigal commented May 9, 2024

+1, ran into this as well, seems to have been introduced after v3.0.4

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

3 participants