Export nameEnvUniqueElts, similar to nameEnvElts, but giving the Unique as well.
[ghc-hetmet.git] / compiler / specialise / SpecConstr.lhs
index 3876a44..99d51f1 100644 (file)
@@ -786,11 +786,11 @@ specialise env calls (fn, rhs, arg_occs)
                         [ exprsFreeVars pats `delVarSetList` vs 
                         | (vs,pats) <- good_pats ]
              uniq_pats = nubBy (same_pat in_scope) good_pats
-       ; pprTrace "specialise" (vcat [ppr fn <+> ppr arg_occs,
-                                       text "calls" <+> ppr all_calls,
-                                       text "good pats" <+> ppr good_pats,
-                               text "uniq pats" <+> ppr uniq_pats])  $
-         return ()
+--     ; pprTrace "specialise" (vcat [ppr fn <+> ppr arg_occs,
+--                                     text "calls" <+> ppr all_calls,
+--                                     text "good pats" <+> ppr good_pats,
+--                             text "uniq pats" <+> ppr uniq_pats])  $
+--       return ()
 
        ; (rules, spec_prs) <- mapAndUnzipUs (spec_one fn rhs) 
                                             (uniq_pats `zip` [1..])
@@ -925,6 +925,15 @@ argToPat :: InScopeEnv                     -- What's in scope at the fn defn site
 argToPat in_scope con_env arg@(Type ty) arg_occ
   = return (False, arg)
 
+argToPat in_scope con_env (Note n arg) arg_occ
+  = argToPat in_scope con_env arg arg_occ
+       -- Note [Notes in call patterns]
+       -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       -- Ignore Notes.  In particular, we want to ignore any InlineMe notes
+       -- Perhaps we should not ignore profiling notes, but I'm going to
+       -- ride roughshod over them all for now.
+       --- See Note [Notes in RULE matching] in Rules
+
 argToPat in_scope con_env (Let _ arg) arg_occ
   = argToPat in_scope con_env arg arg_occ
        -- Look through let expressions