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

Difference between utop & ocaml w.r.t. double semicolumn #453

Open
cuihtlauac opened this issue Jul 31, 2023 · 4 comments
Open

Difference between utop & ocaml w.r.t. double semicolumn #453

cuihtlauac opened this issue Jul 31, 2023 · 4 comments

Comments

@cuihtlauac
Copy link

cuihtlauac commented Jul 31, 2023

Here are an ocaml session and an utop session back to back. I believe the difference in output is a bug. Sorry for the noise if it isn't.

$ ocaml
OCaml version 5.0.0
Enter #help;; for help.

# let () = print_string "foo"
  let () = print_string "bar"
  let () = flush_all ();;
foobar#
$ utop
────────┬─────────────────────────────────────────────────────────────┬─────────
        │ Welcome to utop version 2.13.1 (using OCaml version 5.0.0)! │         
        └─────────────────────────────────────────────────────────────┘         
Type #utop_help for help about using utop.

─( 14:27:54 )─< command 0 >──────────────────────────────────────{ counter: 0 }─
utop # let () = print_string "foo"
       let () = print_string "bar"
       let () = flush_all ();;
─( 14:27:54 )─< command 1 >──────────────────────────────────────{ counter: 0 }─
utop # 
@emillon
Copy link
Collaborator

emillon commented Jul 31, 2023

What was the resolution?

@cuihtlauac
Copy link
Author

It's not a bug.

@cuihtlauac cuihtlauac reopened this Aug 2, 2023
@cuihtlauac
Copy link
Author

cuihtlauac commented Aug 2, 2023

Sorry, in the first version of this report, I wasn't flushing. I thought it was allowed to lose the output because flush was not called. With an added call to flush I believe, again, that there is a bug.

@cuihtlauac
Copy link
Author

# let rec f x = f x in f 42
  print_endline "42";;

To me, this suggests the output is lost in the first example

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

2 participants