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
Original bug ID: 393 Reporter: administrator Status: closed Resolution: not a bug Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Hi,
I am trying to learn OCAML. While playing with the interpreter, I entered
the following function definition:
let myfun (x :: y :: [] | x :: _ :: y :: _) = x :: y :: [] ;;
the interpreter accepted that (with a warning that the definition was not
exhaustive for the 'a list type, which is perfectly right).
When I tried to execute the function on an example:
myfun [2 ; 3] ;;
The interpreter crashed!!!!
I was using the Windows interpreter (my PC has Windows NT), but I tried it
on the UNIX version, and this one crashed as well.
Then I tried to use the compiler (ocamlopt.opt) on the UNIX system. I put
the definition in the program, applied the function to [2;3] as well as
[2;3;4], and printed out the results. It ran beautifully with no error.
Thanks,
Dan Arnon
The text was updated successfully, but these errors were encountered:
I am trying to learn OCAML. While playing with the interpreter, I entered
the following function definition:
let myfun (x :: y :: [] | x :: _ :: y :: _) = x :: y :: [] ;;
the interpreter accepted that (with a warning that the definition was not
exhaustive for the 'a list type, which is perfectly right).
When I tried to execute the function on an example:
myfun [2 ; 3] ;;
The interpreter crashed!!!!
I was using the Windows interpreter (my PC has Windows NT), but I tried it
on the UNIX version, and this one crashed as well.
Then I tried to use the compiler (ocamlopt.opt) on the UNIX system. I put
the definition in the program, applied the function to [2;3] as well as
[2;3;4], and printed out the results. It ran beautifully with no error.
Thanks,
Dan Arnon
This bug is known and classified as #326 in the ocaml bug tracking
system.
Original bug ID: 393
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Hi,
I am trying to learn OCAML. While playing with the interpreter, I entered
the following function definition:
let myfun (x :: y :: [] | x :: _ :: y :: _) = x :: y :: [] ;;
the interpreter accepted that (with a warning that the definition was not
exhaustive for the 'a list type, which is perfectly right).
When I tried to execute the function on an example:
myfun [2 ; 3] ;;
The interpreter crashed!!!!
I was using the Windows interpreter (my PC has Windows NT), but I tried it
on the UNIX version, and this one crashed as well.
Then I tried to use the compiler (ocamlopt.opt) on the UNIX system. I put
the definition in the program, applied the function to [2;3] as well as
[2;3;4], and printed out the results. It ran beautifully with no error.
Thanks,
Dan Arnon
The text was updated successfully, but these errors were encountered: