summaryrefslogtreecommitdiff
path: root/devel/compiler/Match.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-06-27 11:59:03 +0000
committeraarne <aarne@cs.chalmers.se>2008-06-27 11:59:03 +0000
commit73e401cee21fa61dcf9900d8d2b40ddd39f4e612 (patch)
treec5569db477fd0281162fd7ba29cf8e60d24b364e /devel/compiler/Match.hs
parent64d2a981a99c8f48f85c4efd0cecd1db1e5ce93a (diff)
updated synopsis, removed GF/devel/
Diffstat (limited to 'devel/compiler/Match.hs')
-rw-r--r--devel/compiler/Match.hs21
1 files changed, 0 insertions, 21 deletions
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
-