ocaml: Fix result of (concat [1 2]), so it returns a list not a vector.
authorBen Harris <bjh21@bjh21.me.uk>
Tue, 7 May 2019 21:59:26 +0000 (22:59 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Tue, 7 May 2019 21:59:26 +0000 (22:59 +0100)
ocaml/core.ml

index 73a1378..f733c04 100644 (file)
@@ -123,7 +123,8 @@ let init env = begin
     (Types.fn (let rec concat =
                  function
                  | x :: y :: more -> concat ((Types.list ((seq x) @ (seq y))) :: more)
-                 | [x] -> x
+                 | [T.List _ as x] -> x
+                 | [x] -> Types.list (seq x)
                  | [] -> Types.list []
                in concat));