[project @ 2003-04-11 12:51:45 by simonmar]
authorsimonmar <unknown>
Fri, 11 Apr 2003 12:51:45 +0000 (12:51 +0000)
committersimonmar <unknown>
Fri, 11 Apr 2003 12:51:45 +0000 (12:51 +0000)
Add an ASSERT to confirm an invariant: all Ids defined in this module
should be LocalIds until the CoreTidy phase.

ghc/compiler/main/TidyPgm.lhs

index f5cd4cd..26a2fde 100644 (file)
@@ -469,8 +469,10 @@ tidyTopBinder mod ext_ids caf_info rec_tidy_env rhs tidy_rhs
        -- in the IdInfo of one early in the group
 
        -- The rhs is already tidied
-       
-  = ((orig_env', occ_env', subst_env'), id')
+
+  = ASSERT(isLocalId id)  -- "all Ids defined in this module are local
+                         -- until the CoreTidy phase"  --GHC comentary
+    ((orig_env', occ_env', subst_env'), id')
   where
     (orig_env', occ_env', name') = tidyTopName mod ns2 occ_env2
                                               is_external