From 4ec7f0b73f8aa43eccf387bdec55fc464d809896 Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Mon, 13 Nov 2023 10:12:42 +0100 Subject: Simplified the representation of expressions in strings --- lib/syntax/t.ml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/syntax/t.ml') diff --git a/lib/syntax/t.ml b/lib/syntax/t.ml index 38ad5b0..c50d2e2 100644 --- a/lib/syntax/t.ml +++ b/lib/syntax/t.ml @@ -2,14 +2,10 @@ This module contains the basic operators used in the QSP syntax. *) -open StdLabels - -type 'a literal = Text of string | Expression of 'a list +type 'a literal = Text of string | Expression of 'a let map_litteral : f:('a -> 'b) -> 'a literal -> 'b literal = - fun ~f -> function - | Text t -> Text t - | Expression e -> Expression (List.map ~f e) + fun ~f -> function Text t -> Text t | Expression e -> Expression (f e) type boperator = | Eq -- cgit v1.2.3