From e6661bfa6a3d7dc477d0b7717c80bd536eca2d68 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sat, 14 Mar 2026 11:39:04 -0300 Subject: =?UTF-8?q?Branching=20and=20na=C3=AFve=20merge=20strategies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * AGPL license * branching and merging * Delete LICENSE in favor of separate PR Signed-off-by: Marcos Magueta * add unmonitored tests and docs --------- Signed-off-by: Marcos Magueta --- lib/dcl/parser.ml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/dcl/parser.ml') diff --git a/lib/dcl/parser.ml b/lib/dcl/parser.ml index a7981c0..3caf748 100644 --- a/lib/dcl/parser.ml +++ b/lib/dcl/parser.ml @@ -1,7 +1,13 @@ type error = ParseError of string let of_string s = - match Sexplib.Sexp.of_string s |> Ast.statement_of_sexp with + (* ppx_sexp_conv encodes no-argument variants as bare atoms, so + unwrap a single-element list (e.g. (GetHead)) → atom (GetHead). *) + let sexp = match Sexplib.Sexp.of_string s with + | Sexplib.Sexp.List [atom] -> atom + | other -> other + in + match Ast.statement_of_sexp sexp with | stmt -> Ok stmt | exception exn -> Error (ParseError (Printexc.to_string exn)) -- cgit v1.2.3