[project @ 2003-06-25 08:20:20 by simonpj]
[ghc-hetmet.git] / ghc / compiler / deSugar / DsBinds.lhs
index 4f2323d..97c844e 100644 (file)
@@ -14,14 +14,14 @@ module DsBinds ( dsMonoBinds, AutoScc(..) ) where
 
 
 import {-# SOURCE #-}  DsExpr( dsExpr )
+import DsMonad
+import DsGRHSs         ( dsGuarded )
+import DsUtils
 
 import HsSyn           -- lots of things
 import CoreSyn         -- lots of things
 import CoreUtils       ( exprType, mkInlineMe, mkSCC )
 import TcHsSyn         ( TypecheckedMonoBinds )
-import DsMonad
-import DsGRHSs         ( dsGuarded )
-import DsUtils
 import Match           ( matchWrapper )
 
 import CmdLineOpts     ( opt_AutoSccsOnAllToplevs, opt_AutoSccsOnExportedToplevs )
@@ -54,9 +54,6 @@ dsMonoBinds auto_scc (AndMonoBinds  binds_1 binds_2) rest
   = dsMonoBinds auto_scc binds_2 rest  `thenDs` \ rest' ->
     dsMonoBinds auto_scc binds_1 rest'
 
-dsMonoBinds _ (CoreMonoBind var core_expr) rest
-  = returnDs ((var, core_expr) : rest)
-
 dsMonoBinds _ (VarMonoBind var expr) rest
   = dsExpr expr                        `thenDs` \ core_expr ->
 
@@ -78,7 +75,7 @@ dsMonoBinds _ (VarMonoBind var expr) rest
 
 dsMonoBinds auto_scc (FunMonoBind fun _ matches locn) rest
   = putSrcLocDs locn   $
-    matchWrapper (FunRhs fun) matches                  `thenDs` \ (args, body) ->
+    matchWrapper (FunRhs (idName fun)) matches         `thenDs` \ (args, body) ->
     addAutoScc auto_scc (fun, mkLams args body)                `thenDs` \ pair ->
     returnDs (pair : rest)