From 73e401cee21fa61dcf9900d8d2b40ddd39f4e612 Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 27 Jun 2008 11:59:03 +0000 Subject: updated synopsis, removed GF/devel/ --- devel/compiler/Match.hs | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 devel/compiler/Match.hs (limited to 'devel/compiler/Match.hs') diff --git a/devel/compiler/Match.hs b/devel/compiler/Match.hs deleted file mode 100644 index a9ac839ef..000000000 --- a/devel/compiler/Match.hs +++ /dev/null @@ -1,21 +0,0 @@ -module Match where - -import AbsSrc -import AbsTgt - -import Env -import STM - -match :: [Case] -> Exp -> STM Env Exp -match cs v = checks $ map (tryMatch v) cs - ----- return substitution -tryMatch :: Exp -> Case -> STM Env Exp -tryMatch e (Cas p v) = if fit (e, p) then return v else raise "no fit" where - fit (exp,patt) = case (exp,patt) of - (ECst c es, PCon d ps) -> - c == d && - length es == length ps && - all fit (zip es ps) - (_,PVar _) -> True ---- not is exp contains variables - -- cgit v1.2.3