Utop-eval-buffer doesn't eval. It only copies source code [emacs]


#1

When I run utop-eval-buffer in emacs, my code is copied over to a utop repl buffer, but it doesn’t actually eval. I have to switch to the utop buffer and press enter. Then, only my first let binding gets eval’d.

sample reason file:

let identity = x => x;

let times = (x, y) => x * y;

let triple = x => times(3, x);

gets copied to the utop buffer:

utop[8]> let identity = x => x;

let f = (x, y) => x * y;

let triple = x => f(3, x);
;

after I press enter only my first let binding is evaluated:

let identity: ('a) => 'a = <fun>;

With sml-mode if I run sml-prog-proc-send-buffer, the entire buffer is evaluated and all let bindings are shown. How can I get a similar experience whit reason-mode?