Fixed an inappropriate use of type equality that was causing problems with operators that return arrays

This commit is contained in:
Neil Brown 2009-04-17 18:31:11 +00:00
parent 0f277365b5
commit 40fc118c31

View File

@ -272,7 +272,7 @@ inferTypes = occamOnlyPass "Infer types"
-- Must have right argument types:
, and $ zipWith (maybe True) (map typeEqForOp ts) mts
-- Must have right return type:
, ctx == A.Infer || ctx == rt
, ctx == A.Infer || ctx `typeEqForOp` rt
]
pickTypes :: [Maybe A.Type] -> [Maybe A.Type]