You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run the koka program unmodified (koka -e -i<path-to-kk-community-std> interpreter.kk), you should just see a bunch of passing tests. However, if you change line 146 in typecheck.kk from throw("Typecheck: case types do not match at " ++ exp_with_pos.exp_with_pos/exp.show) to throw("Typecheck: case types do not match at " ++ exp.show), the program hangs on the final test (possibly stuck in an infinite recursion?) and finally segfaults. exp is defined at this point as val exp = exp_with_pos.exp (exp_with_pos/ implied, see line 54), and exp_with_pos/exp is an automatically generated function, so the two programs should be behaviorally identical.
(note: I'm not sure I fully understand why exp_with_pos/exp is marked as being <exn,div>, or if that is normal for automatically generated accessor functions for structs)
Koka version information:
Koka 3.1.2, 17:56:43 May 30 2024 (ghc release version)
version: 3.1.2
The text was updated successfully, but these errors were encountered:
I have two versions of a program that should have identical behavior, but one segfaults and the other doesn't.
To reproduce the issue, clone the repository at this commit. You'll need to include the koka community std repository in your include paths.
If you run the koka program unmodified (
koka -e -i<path-to-kk-community-std> interpreter.kk
), you should just see a bunch of passing tests. However, if you change line 146 intypecheck.kk
fromthrow("Typecheck: case types do not match at " ++ exp_with_pos.exp_with_pos/exp.show)
tothrow("Typecheck: case types do not match at " ++ exp.show)
, the program hangs on the final test (possibly stuck in an infinite recursion?) and finally segfaults.exp
is defined at this point asval exp = exp_with_pos.exp
(exp_with_pos/
implied, see line 54), andexp_with_pos/exp
is an automatically generated function, so the two programs should be behaviorally identical.(note: I'm not sure I fully understand why
exp_with_pos/exp
is marked as being<exn,div>
, or if that is normal for automatically generated accessor functions for structs)Koka version information:
The text was updated successfully, but these errors were encountered: