Corrected a bug where user-defined types involved with operators were not being resolved properly

This commit is contained in:
Neil Brown 2009-04-17 18:19:09 +00:00
parent 87f69d816f
commit 032e40f562

View File

@ -285,7 +285,7 @@ inferTypes = occamOnlyPass "Infer types"
-- We have to catch errors here because if it's an operator inside -- We have to catch errors here because if it's an operator inside
-- an operator, the type-getting will fail because we haven't resolved -- an operator, the type-getting will fail because we haven't resolved
-- the inner operator yet. -- the inner operator yet.
origTs <- sequence [astTypeOf e `catchError` (const $ return A.Infer) | e <- es] origTs <- sequence [(astTypeOf e >>= underlyingType m) `catchError` (const $ return A.Infer) | e <- es]
es' <- mapM (uncurry inTypeContext) es' <- mapM (uncurry inTypeContext)
$ zip (pickTypes [case t of $ zip (pickTypes [case t of