diff --git a/src/main.ml b/src/main.ml
index 843aa75f26431712ca38f15959f56e0fd1e6cee8..5b94405b5d85b2c5a7f263da9f9b2406bc8bfd8f 100644
--- a/src/main.ml
+++ b/src/main.ml
@@ -229,7 +229,7 @@ let verify_cmd =
   let term =
     let files =
       let doc = "File to verify." in
-      let file_or_stdin = Verification.File.(of_string, pretty) in
+      let file_or_stdin = Arg.conv' Verification.File.(of_string, pretty) in
       Arg.(non_empty & pos_all file_or_stdin [] & info [] ~doc ~docv:"FILE")
     in
     let prover =
diff --git a/src/verification.ml b/src/verification.ml
index c802ac83ce0e46104189a171fc5732b55214b11d..693ee845f7efabddf045946f80c9f6a9d85872b8 100644
--- a/src/verification.ml
+++ b/src/verification.ml
@@ -48,10 +48,10 @@ module File = struct
 
   let of_string s =
     if String.equal s "-"
-    then `Ok Stdin
+    then Ok Stdin
     else if Caml.Sys.file_exists s
-    then `Ok (File s)
-    else `Error (Fmt.str "no '%s' file or directory" s)
+    then Ok (File s)
+    else Error (Fmt.str "no '%s' file or directory" s)
 
   let pretty fmt = function
     | Stdin -> Fmt.string fmt "-"
diff --git a/src/verification.mli b/src/verification.mli
index d1f2186bd1a93f8e651f24646944c7b0ad2cafe3..b9a262b63bd80c8b942194379ca5032d7954d935 100644
--- a/src/verification.mli
+++ b/src/verification.mli
@@ -38,7 +38,7 @@ module File : sig
   type t
 
   val of_json_config : json_config -> t
-  val of_string : string -> [ `Ok of t | `Error of string ]
+  val of_string : string -> (t, string) result
   val pretty : Format.formatter -> t -> unit
 end