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
The following code causes a segmentation fault when compiled in bytecode (not in native):
letrec f=let [| f0 |] = [| 0 |] infunction|0 -> f0
|n -> f (n -1)
let _ = f 1
Even weirder, the issue still stands when replacing the code by this:
letrec f=let0=0infunction|0 -> 0|n -> f (n -1)
let _ = f 1
It seems the conjunction of a non-exhaustive pattern-matching and a let rec doesn't work very well. To be fair, the manual only describes the case let rec f = let x = _ in _, and not the case where x is replaced by a pattern, but it seems that replacing it by any exhaustive non-constructor pattern (tuples, records, polymorphic variant, lazy) causes no such issue.