1 | open Core |
2 | |
3 | let prompt ~callback message = |
4 | print_endline message; |
5 | print_endline "Type YES to continue"; |
6 | let input = In_channel.(input_line stdin) in |
7 | match input with |
8 | | Some value -> ( |
9 | match value with "YES" -> callback () | _ -> print_endline "aborted") |
10 | | None -> () |