From f4e6664361f2eaf10f2bd3c81916acc57c547037 Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Sun, 19 Jun 2011 08:59:07 -0400 Subject: Fix bug in the rule_error --- game.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/game.ml b/game.ml index c327890..f1cbccf 100644 --- a/game.ml +++ b/game.ml @@ -8,9 +8,9 @@ let unfold (Lambda x) = x let id = Lambda(fun x -> x) -let (@) a1 a2 = - try unfold a1 a2 with Rule_error "wrong application" - -> id;; +let (@) a1 a2 = match a1 with + | Lambda l1 -> l1 a2 + | _ -> raise( Rule_error "wrong application") type slot = { mutable vitality: int; -- cgit v1.2.3-70-g09d2