Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
caisar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
caisar
Commits
3cb2c5f4
Commit
3cb2c5f4
authored
2 years ago
by
Michele Alberti
Browse files
Options
Downloads
Patches
Plain Diff
[cmdline] Use cmdliner converter for regular result type.
parent
6fb8aa76
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/main.ml
+1
-1
1 addition, 1 deletion
src/main.ml
src/verification.ml
+3
-3
3 additions, 3 deletions
src/verification.ml
src/verification.mli
+1
-1
1 addition, 1 deletion
src/verification.mli
with
5 additions
and
5 deletions
src/main.ml
+
1
−
1
View file @
3cb2c5f4
...
@@ -229,7 +229,7 @@ let verify_cmd =
...
@@ -229,7 +229,7 @@ let verify_cmd =
let
term
=
let
term
=
let
files
=
let
files
=
let
doc
=
"File to verify."
in
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"
)
Arg
.(
non_empty
&
pos_all
file_or_stdin
[]
&
info
[]
~
doc
~
docv
:
"FILE"
)
in
in
let
prover
=
let
prover
=
...
...
This diff is collapsed.
Click to expand it.
src/verification.ml
+
3
−
3
View file @
3cb2c5f4
...
@@ -48,10 +48,10 @@ module File = struct
...
@@ -48,10 +48,10 @@ module File = struct
let
of_string
s
=
let
of_string
s
=
if
String
.
equal
s
"-"
if
String
.
equal
s
"-"
then
`
Ok
Stdin
then
Ok
Stdin
else
if
Caml
.
Sys
.
file_exists
s
else
if
Caml
.
Sys
.
file_exists
s
then
`
Ok
(
File
s
)
then
Ok
(
File
s
)
else
`
Error
(
Fmt
.
str
"no '%s' file or directory"
s
)
else
Error
(
Fmt
.
str
"no '%s' file or directory"
s
)
let
pretty
fmt
=
function
let
pretty
fmt
=
function
|
Stdin
->
Fmt
.
string
fmt
"-"
|
Stdin
->
Fmt
.
string
fmt
"-"
...
...
This diff is collapsed.
Click to expand it.
src/verification.mli
+
1
−
1
View file @
3cb2c5f4
...
@@ -38,7 +38,7 @@ module File : sig
...
@@ -38,7 +38,7 @@ module File : sig
type
t
type
t
val
of_json_config
:
json_config
->
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
val
pretty
:
Format
.
formatter
->
t
->
unit
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment