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

Crash in defunctionalisation #2197

Closed
athas opened this issue Dec 5, 2024 · 0 comments
Closed

Crash in defunctionalisation #2197

athas opened this issue Dec 5, 2024 · 0 comments

Comments

@athas
Copy link
Member

athas commented Dec 5, 2024

Pretty sure the actual issue is that lambda lifting produces some nonsense code by neglecting to transform expressions in types (but why do we even still have those at that point?)

def index_of_first p xs =
  loop i = 0 while i < length xs && !p xs[i] do i + 1

def span p xs = let i = index_of_first p xs in (take i xs, drop i xs)

entry part1 [l] (ls: [][l]i32) =
  let blank (l: [l]i32) = null l
  in span blank ls |> \(x, y) -> (id x, tail y)
athas added a commit that referenced this issue Dec 5, 2024
@athas athas closed this as completed in 942aaa3 Dec 5, 2024
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

1 participant