Changeset 14203 for src/Pugs/Eval
- Timestamp:
- 10/11/06 05:35:58 (2 years ago)
- Files:
-
- 1 modified
-
src/Pugs/Eval/Var.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Eval/Var.hs
r14176 r14203 310 310 doFindSub slurpLens subSyms = do 311 311 subs' <- subs slurpLens subSyms 312 -- let foo (x, sub) = show x ++ show (map paramContext $ subParams sub) 313 -- trace (unlines $ map foo $ sort subs') return () 312 -- traceM (unlines $ map (\(x, y) -> show (x, subParams y)) subs') 314 313 return $ case sort subs' of 315 314 ((_, sub):_) -> Just sub … … 495 494 inferExpType (App (Var name) invs args) = do 496 495 sub <- findSub name invs args 497 case sub of 498 Right sub -> return $ subReturns sub 499 Left _ -> return $ mkType "Any" 496 return (either (const anyType) subReturns sub) 500 497 inferExpType (Ann (Cxt cxt) _) | typeOfCxt cxt /= (mkType "Any") = return $ typeOfCxt cxt 501 inferExpType (Ann (Cxt _) exp) = inferExpType exp 502 inferExpType (Ann (Pos _) exp) = inferExpType exp 498 inferExpType (Ann _ exp) = inferExpType exp 503 499 inferExpType (Pad _ _ exp) = inferExpType exp 504 500 inferExpType (Sym _ _ exp) = inferExpType exp
