aboutsummaryrefslogtreecommitdiffstats
path: root/lib/icl/executor.ml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/icl/executor.ml10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/icl/executor.ml b/lib/icl/executor.ml
index a895135..591f839 100644
--- a/lib/icl/executor.ml
+++ b/lib/icl/executor.ml
@@ -2,8 +2,16 @@ module Make (Storage : Management.Physical.S) = struct
module Ops = Manipulation.Make(Storage)
type error =
+ | ParseError of string
| ManipulationError of Manipulation.error
- | ConversionError of string
+ | ConversionError of string
+
+ let sexp_of_error e =
+ let open Sexplib.Sexp in
+ match e with
+ | ParseError s -> List [Atom "parse-error"; Atom s]
+ | ManipulationError e -> Manipulation.sexp_of_error e
+ | ConversionError s -> List [Atom "conversion-error"; Atom s]
let wrap_manip = Result.map_error (fun e -> ManipulationError e)