[project @ 1999-07-28 15:34:39 by simonpj]
[ghc-hetmet.git] / ghc / compiler / typecheck / TcExpr.lhs
index e2599cf..32a2eb2 100644 (file)
@@ -143,7 +143,7 @@ tcPolyExpr arg expected_arg_ty
     newDicts SignatureOrigin sig_theta         `thenNF_Tc` \ (sig_dicts, dict_ids) ->
        -- ToDo: better origin
     tcSimplifyAndCheck 
-       (text "tcPolyExpr")
+       (text "the type signature of an expression")
        (mkVarSet zonked_sig_tyvars)
        sig_dicts lie_arg                       `thenTc` \ (free_insts, inst_binds) ->
 
@@ -159,7 +159,8 @@ tcPolyExpr arg expected_arg_ty
     returnTc ( generalised_arg, free_insts,
               arg', sig_tau, lie_arg )
   where
-    sig_msg ty = ptext SLIT("In an expression with expected type:") <+> ppr ty
+    sig_msg ty = sep [ptext SLIT("In an expression with expected type:"),
+                     nest 4 (ppr ty)]
 \end{code}
 
 %************************************************************************
@@ -376,9 +377,9 @@ tcMonoExpr (CCall lbl args may_gc is_asm ignored_fake_result_ty) res_ty
 \end{code}
 
 \begin{code}
-tcMonoExpr (HsSCC label expr) res_ty
+tcMonoExpr (HsSCC lbl expr) res_ty
   = tcMonoExpr expr res_ty             `thenTc` \ (expr', lie) ->
-    returnTc (HsSCC label expr', lie)
+    returnTc (HsSCC lbl expr', lie)
 
 tcMonoExpr (HsLet binds expr) res_ty
   = tcBindsAndThen
@@ -981,7 +982,7 @@ Errors and contexts
 Mini-utils:
 \begin{code}
 pp_nest_hang :: String -> SDoc -> SDoc
-pp_nest_hang label stuff = nest 2 (hang (text label) 4 stuff)
+pp_nest_hang lbl stuff = nest 2 (hang (text lbl) 4 stuff)
 \end{code}
 
 Boring and alphabetical: