utop

OCaml: Can't run utop after installing it

依然范特西╮ 提交于 2020-01-01 08:52:21
问题 I'm trying to learn OCaml through the Real World OCaml book. They have a guide by which I am supposed to install the Core package and utop. However, while I seem to be successfully installing both of these using Opam, neither of them works when I try to use them. I know that they're installed, because when I try to install them again, I get this message: $ opam install utop core [NOTE] Package utop is already installed (current version is 1.10). [NOTE] Package core is already installed

OCaml: Can't run utop after installing it

谁都会走 提交于 2020-01-01 08:52:03
问题 I'm trying to learn OCaml through the Real World OCaml book. They have a guide by which I am supposed to install the Core package and utop. However, while I seem to be successfully installing both of these using Opam, neither of them works when I try to use them. I know that they're installed, because when I try to install them again, I get this message: $ opam install utop core [NOTE] Package utop is already installed (current version is 1.10). [NOTE] Package core is already installed

Why is `;;` giving me a syntax error in utop?

让人想犯罪 __ 提交于 2019-12-11 04:26:07
问题 I'm working on a short project to convert small programs from python to java and visa versa. I created the following code, and tested it in utop. let c = let x = "for (int i = 0; i<10; i++)" and y = "for i in range(0,10):" in function | x -> y | y -> x | _ -> "Oh no!!";; For some reason, x & y are both considered unbound, yet at the same time any parameter seems to match to x. What order does everything need to be written in to make this work? 回答1: Simply to follow up with your answer. In

OCaml: Can't run utop after installing it

試著忘記壹切 提交于 2019-12-04 03:01:40
I'm trying to learn OCaml through the Real World OCaml book. They have a guide by which I am supposed to install the Core package and utop. However, while I seem to be successfully installing both of these using Opam, neither of them works when I try to use them. I know that they're installed, because when I try to install them again, I get this message: $ opam install utop core [NOTE] Package utop is already installed (current version is 1.10). [NOTE] Package core is already installed (current version is 109.55.02). However, when I try to enter "utop" to start utop, it doesn't work. $ utop