6

When I'm using OCaml utop every line of the input and output is printed into the console:

───┬──────────────────────────────────────────────────────────────┬───
   │ Welcome to utop version 2.10.0 (using OCaml version 4.14.0)! │
   └──────────────────────────────────────────────────────────────┘

Type #utop_help for help about using utop.

─( 22:17:51 )─< command 0 >─────────────────────────────{ counter: 0}─
utop # let x = 50;;
val x : int = 50

Is it possible to export each of user inputs and outputs from utop session into specific file?

pitagoras3
  • 1,988
  • 2
  • 14
  • 18

1 Answers1

3

Your input is saved by default at ~/.utop-history . Isn't that enough for your purpose?

You can also change location and file size by manipulating UTop.history_file_name and other variables.

rafix
  • 1,739
  • 9
  • 9