mirror of
https://github.com/c-cube/sidekick.git
synced 2026-01-26 03:16:41 -05:00
15 lines
313 B
OCaml
15 lines
313 B
OCaml
|
|
(** {1 Main for dimacs} *)
|
|
|
|
type 'a or_error = ('a, string) CCResult.t
|
|
|
|
let parse file : int list list or_error =
|
|
try
|
|
CCIO.with_in file
|
|
(fun ic ->
|
|
let lexbuf = Lexing.from_channel ic in
|
|
Parser.file Lexer.token lexbuf)
|
|
|> CCResult.return
|
|
with e ->
|
|
CCResult.of_exn_trace e
|
|
|