Correct an egregious typo in LiberateCase that emasculated it
authorsimonpj@microsoft.com <unknown>
Fri, 11 May 2007 15:55:07 +0000 (15:55 +0000)
committersimonpj@microsoft.com <unknown>
Fri, 11 May 2007 15:55:07 +0000 (15:55 +0000)
Somehow in the patch
  * Record-ise the liberate-case envt, in preparation for new stuff
I managed to make lookupLevelEnv do entirely the wrong thing.

I think it was just a typo.  The result was that LiberateCase essentially
never did anything any more.

Easily fixed though!

compiler/simplCore/LiberateCase.lhs

index 02a3fab..a7b613d 100644 (file)
@@ -351,7 +351,7 @@ lookupRecId env id = lookupVarEnv (lc_rec_env env) id
 lookupLevel :: LibCaseEnv -> Id -> LibCaseLevel
 lookupLevel env id
   = case lookupVarEnv (lc_lvl_env env) id of
-      Just lvl -> lc_lvl env
+      Just lvl -> lvl
       Nothing  -> topLevel
 
 freeScruts :: LibCaseEnv