From 96a225fb5fa24a71e1b76e0369126b3bcfab5f81 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Tue, 7 Sep 2021 13:44:54 +0200 Subject: Moved the printer to toplevel --- src/bin/transcriptor.ml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/bin/transcriptor.ml') diff --git a/src/bin/transcriptor.ml b/src/bin/transcriptor.ml index 6d02e9d..f86852f 100644 --- a/src/bin/transcriptor.ml +++ b/src/bin/transcriptor.ml @@ -1,13 +1,14 @@ module T = Translator -module P = T.Parser - -module I = P.MenhirInterpreter let process (optional_line : string option) = match optional_line with | None -> () | Some line -> - match T.Reader.process line with + + let res = Result.map + (fun t-> Sounds.repr (module Repr.Default) t) + (T.Reader.process line) in + match res with | Ok response -> print_endline response | Error err -> print_endline err -- cgit v1.2.3