[project @ 2001-03-08 12:07:38 by simonpj]
[ghc-hetmet.git] / ghc / compiler / deSugar / DsBinds.lhs
index 546c80e..cc9c363 100644 (file)
@@ -26,7 +26,7 @@ import Match          ( matchWrapper )
 
 import CmdLineOpts     ( opt_AutoSccsOnAllToplevs, opt_AutoSccsOnExportedToplevs )
 import CostCentre      ( mkAutoCC, IsCafCC(..) )
-import Id              ( idType, idName, isUserExportedId, isSpecPragmaId, Id )
+import Id              ( idType, idName, isExportedId, isSpecPragmaId, Id )
 import NameSet
 import VarSet
 import Type            ( mkTyVarTy )
@@ -78,8 +78,8 @@ dsMonoBinds _ (VarMonoBind var expr) rest
 
 dsMonoBinds auto_scc (FunMonoBind fun _ matches locn) rest
   = putSrcLocDs locn   $
-    matchWrapper (FunMatch fun) matches error_string   `thenDs` \ (args, body) ->
-    addAutoScc auto_scc (fun, mkLams args body)                `thenDs` \ pair ->
+    matchWrapper (FunRhs (idName fun)) matches error_string    `thenDs` \ (args, body) ->
+    addAutoScc auto_scc (fun, mkLams args body)                        `thenDs` \ pair ->
     returnDs (pair : rest)
   where
     error_string = "function " ++ showSDoc (ppr fun)
@@ -188,7 +188,7 @@ addSccs NoSccs   exports = NoSccs
 addSccs TopLevel exports 
   = TopLevelAddSccs (\id -> case [ exp | (_,exp,loc) <- exports, loc == id ] of
                                (exp:_)  | opt_AutoSccsOnAllToplevs || 
-                                           (isUserExportedId exp && 
+                                           (isExportedId exp && 
                                             opt_AutoSccsOnExportedToplevs)
                                        -> Just exp
                                _ -> Nothing)