From 9568d7a844ba6a1872a8e8f6ef002860057e62ab Mon Sep 17 00:00:00 2001 From: peb Date: Fri, 18 Feb 2005 18:21:06 +0000 Subject: "Committed_by_peb" --- src/GF/Grammar/PatternMatch.hs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/GF/Grammar/PatternMatch.hs') diff --git a/src/GF/Grammar/PatternMatch.hs b/src/GF/Grammar/PatternMatch.hs index 88e0f0441..2fcf4440a 100644 --- a/src/GF/Grammar/PatternMatch.hs +++ b/src/GF/Grammar/PatternMatch.hs @@ -1,18 +1,21 @@ ---------------------------------------------------------------------- -- | --- Module : (Module) --- Maintainer : (Maintainer) +-- Module : PatternMatch +-- Maintainer : AR -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date $ --- > CVS $Author $ --- > CVS $Revision $ +-- > CVS $Date: 2005/02/18 19:21:13 $ +-- > CVS $Author: peb $ +-- > CVS $Revision: 1.5 $ -- --- (Description of the module) +-- pattern matching for both concrete and abstract syntax. AR -- 16\/6\/2003 ----------------------------------------------------------------------------- -module PatternMatch where +module PatternMatch (matchPattern, + testOvershadow, + findMatch + ) where import Operations import Grammar @@ -23,8 +26,6 @@ import PrGrammar import List import Monad --- pattern matching for both concrete and abstract syntax. AR -- 16/6/2003 - matchPattern :: [(Patt,Term)] -> Term -> Err (Term, Substitution) matchPattern pts term = @@ -105,7 +106,7 @@ varsOfPatt p = case p of PT _ q -> varsOfPatt q _ -> [] --- to search matching parameter combinations in tables +-- | to search matching parameter combinations in tables isMatchingForms :: [Patt] -> [Term] -> Bool isMatchingForms ps ts = all match (zip ps ts') where match (PC c cs, (Cn d, ds)) = c == d && isMatchingForms cs ds -- cgit v1.2.3