Fixed transformEachRange to change the abbreviation mode of the loop counter

This commit is contained in:
Neil Brown 2008-03-21 15:09:00 +00:00
parent dfea2c11a5
commit 0dc458ff03

View File

@ -195,6 +195,8 @@ transformEachRange = doGeneric `ext1M` doStructured
doStructured (A.Rep repMeta (A.ForEach eachMeta loopVar (A.ExprConstr
_ (A.RangeConstr _ _ begin end))) body)
= do body' <- doStructured body
-- Need to change the stored abbreviation mode to original:
modifyName loopVar $ \nd -> nd { A.ndAbbrevMode = A.Original }
return $ A.Rep repMeta (A.For eachMeta loopVar begin
(addOne $ subExprs end begin)) body'
doStructured s = doGeneric s