Use a sensible NameType for names converted to unscoped.

This is because the code that finds free names looks at the NameType -- which
it certainly shouldn't.
This commit is contained in:
Adam Sampson 2008-04-07 23:36:53 +00:00
parent feb0496d71
commit a5bd28bab4

View File

@ -890,7 +890,7 @@ inferTypes = applyExplicitM10 doExpression doDimension doSubscript
nameToUnscoped :: A.Name -> PassM A.Name
nameToUnscoped n@(A.Name m nt _)
= do nd <- lookupName n
findUnscopedName (A.Name m nt (A.ndOrigName nd))
findUnscopedName (A.Name m A.FieldName (A.ndOrigName nd))
-- | Process a 'LiteralRepr', taking the type it's meant to represent or
-- 'Infer', and returning the type it really is.