diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-04-27 23:29:57 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-04-27 23:29:57 -0300 |
| commit | 4fdf3392868c72ff4c33b70d165a177e97f2fece (patch) | |
| tree | 4eebfc260c890ea56d59f874cdfa0c9b1f55cd98 /lib/envelope.ml | |
| parent | 97960adb8426e5270fe16b027e82a2c61674f821 (diff) | |
| download | Sakura-4fdf3392868c72ff4c33b70d165a177e97f2fece.tar.gz Sakura-4fdf3392868c72ff4c33b70d165a177e97f2fece.zip | |
Format
Diffstat (limited to '')
| -rw-r--r-- | lib/envelope.ml | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/envelope.ml b/lib/envelope.ml index 4b8bc46..1c20c5b 100644 --- a/lib/envelope.ml +++ b/lib/envelope.ml @@ -9,9 +9,8 @@ type tagged = { tag : string; payload : Sexplib.Sexp.t } let parse (input : Sexplib.Sexp.t) : (tagged, Error.t) Result.t = match input with | Sexplib.Sexp.List (Sexplib.Sexp.Atom tag :: rest) -> - let payload = match rest with - | [single] -> single - | many -> Sexplib.Sexp.List many - in - Ok { tag; payload } + let payload = + match rest with [ single ] -> single | many -> Sexplib.Sexp.List many + in + Ok { tag; payload } | s -> Error (Error.MalformedExpression s) |
