diff options
| author | hallgren <hallgren@chalmers.se> | 2012-11-07 17:23:08 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2012-11-07 17:23:08 +0000 |
| commit | 1c0429c322d71c5488604785cf7278fe4ac67bf7 (patch) | |
| tree | b980b73cc3e4928b5952641678c0adf640ae8925 /src/compiler | |
| parent | 8e6c81fe5a00c605440a5707d2eb686485f24b5a (diff) | |
GF.Grammar.PatternMatch: relax overly restrictive type signatures
Diffstat (limited to 'src/compiler')
| -rw-r--r-- | src/compiler/GF/Grammar/PatternMatch.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/GF/Grammar/PatternMatch.hs b/src/compiler/GF/Grammar/PatternMatch.hs index abee4966a..12bd29c8c 100644 --- a/src/compiler/GF/Grammar/PatternMatch.hs +++ b/src/compiler/GF/Grammar/PatternMatch.hs @@ -28,7 +28,7 @@ import Control.Monad import Text.PrettyPrint import Debug.Trace -matchPattern :: [(Patt,Term)] -> Term -> Err (Term, Substitution) +matchPattern :: [(Patt,rhs)] -> Term -> Err (rhs, Substitution) matchPattern pts term = if not (isInConstantForm term) then Bad (render (text "variables occur in" <+> ppTerm Unqualified 0 term)) @@ -57,7 +57,7 @@ testOvershadow pts vs = do ts <- mapM (liftM fst . matchPattern cases) vs return [p | (p,i) <- numpts, notElem i [i | EInt i <- ts] ] -findMatch :: [([Patt],Term)] -> [Term] -> Err (Term, Substitution) +findMatch :: [([Patt],rhs)] -> [Term] -> Err (rhs, Substitution) findMatch cases terms = case cases of [] -> Bad (render (text "no applicable case for" <+> hsep (punctuate comma (map (ppTerm Unqualified 0) terms)))) (patts,_):_ | length patts /= length terms -> |
