8000 [kernel] lifted functions fixes by fwbrasil · Pull Request #1325 · getkyo/kyo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[kernel] lifted functions fixes #1325

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

Merged
merged 1 commit into from
Jul 4, 2025
Merged

[kernel] lifted functions fixes #1325

merged 1 commit into from
Jul 4, 2025

Conversation

fwbrasil
Copy link
Collaborator
@fwbrasil fwbrasil commented Jul 3, 2025

Problem

@ahoy-jon found a couple of issues with lifted functions. Due to the definition of the implicit conversions being in the same scope as the definition of opaque type <, the compiler doesn't introduce a lift conversion, which creates issues with nested computations in generic scopes. Additionally, the compiler is having issues with inlining of pure functions in generic contexts that requires an explicit type annotation.

Solution

Introduce the missing lift calls in the function conversions and add explicit type annotations in methods that take functions.

@@ -72,7 +72,7 @@ object `<`:
val value = v.unsafeGet
Safepoint.handle(value)(
suspend = mapLoop(value),
continue = f(value)
continue = f(value): B < S2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fwbrasil 👏 👏 that's an amazing catch

@ahoy-jon ahoy-jon merged commit c650a37 into main Jul 4, 2025
5 checks passed
@ahoy-jon ahoy-jon deleted the generic-lifted-functions branch July 4, 2025 09:37
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

Successfully merging this pull request may close these issues.

2 participants
0