Added missing DynInt checkPattern clause

This commit is contained in:
Michael Snoyman 2009-10-09 00:30:01 +02:00
parent f232ae6fd9
commit ec355d5811

View File

@ -108,6 +108,9 @@ checkPattern' :: ResourcePatternPiece -> String -> CheckPatternReturn
checkPattern' (Static x) y = if x == y then StaticMatch else NoMatch
checkPattern' (Dynamic x) y = DynamicMatch (x, y)
checkPattern' (Slurp x) _ = error $ "Slurp pattern " ++ x ++ " must be last"
checkPattern' (DynInt x) y
| all isDigit y = DynamicMatch (x, y)
| otherwise = NoMatch
combine :: SMap -> [CheckPatternReturn] -> Maybe SMap
combine s [] = Just $ reverse s