From: acondolu Date: Mon, 24 Jul 2017 13:38:50 +0000 (+0200) Subject: Fixed bug in Scott.mk_match when no branches (Fixes problem 1 in solved) X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=0c2f070e30e80810236099f3a9dcfb6edca0f783;p=fireball-separation.git Fixed bug in Scott.mk_match when no branches (Fixes problem 1 in solved) --- diff --git a/ocaml/problems/solved b/ocaml/problems/solved new file mode 100644 index 0000000..6ea3dd2 --- /dev/null +++ b/ocaml/problems/solved @@ -0,0 +1,3 @@ +$! Scott mk_math with empty bs +D b (_. _. BOT) +C b diff --git a/ocaml/pure.ml b/ocaml/pure.ml index 95dae15..51d1feb 100644 --- a/ocaml/pure.ml +++ b/ocaml/pure.ml @@ -118,7 +118,7 @@ let mk_match t bs = let bs = List.sort (fun (n1,_) (n2,_) -> compare n1 n2) bs in let rec aux m t = function - [] -> dummy + [] -> A (L dummy, t) | (n,p)::tl as l -> if n = m then A (A (t, L (lift (m+1) p)), L (aux (m+1) (V 0) tl))