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

bug in the caml interpreter #2795

Closed
vicuna opened this issue Jun 18, 2001 · 2 comments
Closed

bug in the caml interpreter #2795

vicuna opened this issue Jun 18, 2001 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Jun 18, 2001

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

@vicuna
Copy link
Author

vicuna commented Jun 18, 2001

Comment author: administrator

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

This bug is known and classified as #326 in the ocaml bug tracking
system.

It is fixed in the developpment sources.

Thank you for reporting the bug.

--Luc Maranget

@vicuna
Copy link
Author

vicuna commented Jun 18, 2001

Comment author: administrator

Same as #326, which is fixed argll
-Luc

@vicuna vicuna closed this as completed Jun 18, 2001
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant