[project @ 1997-12-04 11:02:12 by simonm]
[ghc-hetmet.git] / ghc / compiler / reader / PrefixToHs.lhs
index 9b72fa5..a8efe1a 100644 (file)
@@ -45,11 +45,10 @@ cvValSig (RdrTySig vars poly_ty src_loc)
   = [ Sig v poly_ty src_loc | v <- vars ]
 
 cvClassOpSig (RdrTySig vars poly_ty src_loc)
-  = [ ClassOpSig v poly_ty noClassOpPragmas src_loc | v <- vars ]
+  = [ ClassOpSig v Nothing poly_ty src_loc | v <- vars ]
 
 cvInstDeclSig (RdrSpecValSig        sigs) = sigs
 cvInstDeclSig (RdrInlineValSig      sig)  = [ sig ]
-cvInstDeclSig (RdrDeforestSig      sig)  = [ sig ]
 cvInstDeclSig (RdrMagicUnfoldingSig sig)  = [ sig ]
 \end{code}
 
@@ -67,9 +66,7 @@ analyser.
 cvBinds :: SrcFile -> SigConverter -> RdrBinding -> RdrNameHsBinds
 cvBinds sf sig_cvtr binding
   = case (cvMonoBindsAndSigs sf sig_cvtr binding) of { (mbs, sigs) ->
-    if (null sigs)
-    then SingleBind (RecBind mbs)
-    else BindWith   (RecBind mbs) sigs
+    MonoBind mbs sigs recursive
     }
 \end{code}
 
@@ -98,7 +95,6 @@ cvMonoBindsAndSigs sf sig_cvtr fb
 
     mangle_bind (b_acc, s_acc) (RdrSpecValSig       sig) = (b_acc, sig ++ s_acc)
     mangle_bind (b_acc, s_acc) (RdrInlineValSig      sig) = (b_acc, sig : s_acc)
-    mangle_bind (b_acc, s_acc) (RdrDeforestSig       sig) = (b_acc, sig : s_acc)
     mangle_bind (b_acc, s_acc) (RdrMagicUnfoldingSig sig) = (b_acc, sig : s_acc)
 
     mangle_bind (b_acc, s_acc)
@@ -182,7 +178,7 @@ cvMatch sf is_case rdr_match
          RdrMatch_NoGuard ln b c expr    d -> (c,d, [OtherwiseGRHS expr (mkSrcLoc sf ln)])
          RdrMatch_Guards  ln b c gd_exps d -> (c,d, map (cvGRHS sf ln) gd_exps)
 
-cvGRHS :: SrcFile -> SrcLine -> (RdrNameHsExpr, RdrNameHsExpr) -> RdrNameGRHS
+cvGRHS :: SrcFile -> SrcLine -> ([RdrNameStmt], RdrNameHsExpr) -> RdrNameGRHS
 cvGRHS sf sl (g, e) = GRHS g e (mkSrcLoc sf sl)
 \end{code}