Make unsubscriptType handle Infer.

This commit is contained in:
Adam Sampson 2008-04-06 18:42:40 +00:00
parent 39f78e56ee
commit bfd7b079a7

View File

@ -141,6 +141,8 @@ subscriptType sub t = diePC (findMeta sub) $ formatCode "Unsubscriptable type: %
-- | The inverse of 'subscriptType': given a type that we know is the result of
-- a subscript, return what the type being subscripted is.
unsubscriptType :: (CSMR m, Die m) => A.Subscript -> A.Type -> m A.Type
unsubscriptType _ A.Infer
= return $ A.Infer
unsubscriptType (A.SubscriptFromFor _ _ _) t
= return $ removeFixedDimension t
unsubscriptType (A.SubscriptFrom _ _) t