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

Defunctorisation issue #1088

Closed
athas opened this issue Aug 15, 2020 · 0 comments
Closed

Defunctorisation issue #1088

athas opened this issue Aug 15, 2020 · 0 comments

Comments

@athas
Copy link
Member

athas commented Aug 15, 2020

This program is not defunctorised correctly (a type realisation is not done properly), so the compiler will crash later.

module mk_m1 (R: {}) (S: {type s}) = {
  let f1 (k_m: S.s) = 0i32
}

module mk_m2 (S: {type s}) = {
  module solve = mk_m1 {} S

  let f2 (k_m: S.s) = solve.f1 k_m
}

module mk_sm (R: {}) = {
  type s = {}
}

module sm = mk_sm {}
module m2 = mk_m2 sm

let main = m2.f2
@athas athas closed this as completed in 90617ca Aug 16, 2020
athas added a commit that referenced this issue Aug 17, 2020
athas added a commit that referenced this issue Aug 17, 2020
This reverts commit 90617ca.

We need to fix this properly.  That hack added more problems than it solved.
@athas athas reopened this Aug 17, 2020
@athas athas closed this as completed in 0fb1e27 Aug 19, 2020
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