From: natile Date: Wed, 2 Oct 2002 16:28:43 +0000 (+0000) Subject: Whithout List.hd error X-Git-Tag: new_mathql_before_first_merge~21 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=61872e154b77378c203e4a9b179b4067cfe7f23b;p=helm.git Whithout List.hd error --- diff --git a/helm/ocaml/mathql_interpreter/mqint.ml b/helm/ocaml/mathql_interpreter/mqint.ml index 89c180abe..ba7d0713a 100644 --- a/helm/ocaml/mathql_interpreter/mqint.ml +++ b/helm/ocaml/mathql_interpreter/mqint.ml @@ -329,9 +329,12 @@ and exec_boole_exp c = function and exec_val_exp c = function | MathQL.Const x -> let ol = List.sort compare x in let rec edup = function + [] -> [] - | s::tl -> if s = (List.hd tl) then edup tl - else s::(edup tl) + | s::tl -> if tl <> [] then + if s = (List.hd tl) then edup tl + else s::(edup tl) + else s::[] in edup ol | MathQL.Record (rvar, vvar) -> List.assoc vvar (List.assoc rvar c.groups)