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

getLambda internal error with value structs #654

Open
Plyb opened this issue Jan 7, 2025 · 0 comments
Open

getLambda internal error with value structs #654

Plyb opened this issue Jan 7, 2025 · 0 comments

Comments

@Plyb
Copy link

Plyb commented Jan 7, 2025

I'm not 100% sure this isn't just me doing something wrong, but I'm getting an error message that says the following:

typecheck(1, 1): internal error: Backend.C.genLambda: typecheck/@mlift-add_block_statements@10285@<lambda> has multiple value type fields that each contain both raw types and regular types.
hint: use 'box' on either field to make it a non-value type.
CallStack (from HasCallStack):
  error, called at src/Common/Failure.hs:46:12 in koka-3.1.2-2NpoSf9Uv2JEsgjfT7jQ0Q:Common.Failure
  raise, called at src/Common/Failure.hs:32:5 in koka-3.1.2-2NpoSf9Uv2JEsgjfT7jQ0Q:Common.Failure
  failure, called at src/Backend/C/FromCore.hs:1199:35 in koka-3.1.2-2NpoSf9Uv2JEsgjfT7jQ0Q:Backend.C.FromCore

Failed to compile test.kk

typecheck in this case, is the name of the koka file where the error is happening, and add_block_statements is the function. to reproduce the issue, you can clone the repository at this commit. You'll need to add the koka community std repository to the include paths, since this repository relies on the hash-map implementation from that one.

The issue can be worked around by changing the hash-map definition in the koka community std repo from pub value struct to simply pub struct.

Koka version information:

Koka 3.1.2, 17:56:43 May 30 2024 (ghc release version)
version: 3.1.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant