Commit 77537a03 authored by sof's avatar sof
Browse files

[project @ 1997-05-26 04:48:18 by sof]

Updated imports; improved ppr
parent b54a4ee4
......@@ -29,7 +29,7 @@ module DsMonad (
IMP_Ubiq()
import Bag ( emptyBag, snocBag, bagToList, Bag )
import CmdLineOpts ( opt_SccGroup )
import CmdLineOpts ( opt_SccGroup, opt_PprUserLength )
import CoreSyn ( SYN_IE(CoreExpr) )
import CoreUtils ( substCoreExpr )
import HsSyn ( OutPat )
......@@ -38,8 +38,7 @@ import Id ( mkSysLocal, mkIdWithNewUniq,
SYN_IE(Id)
)
import PprType ( GenType, GenTyVar )
import PprStyle ( PprStyle(..) )
import Outputable ( pprQuote, Outputable(..) )
import Outputable ( pprQuote, Outputable(..), PprStyle(..) )
import Pretty
import SrcLoc ( noSrcLoc, SrcLoc )
import TcHsSyn ( SYN_IE(TypecheckedPat) )
......@@ -251,7 +250,7 @@ pprDsWarnings sty warns
Incomplete -> ptext SLIT("possibly incomplete")]
pp_warn (flavour, DsMatchContext kind pats loc)
= hang (hcat [ppr PprForUser loc, ptext SLIT(": ")])
= hang (hcat [ppr (PprForUser opt_PprUserLength) loc, ptext SLIT(": ")])
4 (hang msg
4 (pp_match kind pats))
where
......
......@@ -35,12 +35,12 @@ import HsSyn ( HsExpr(..), OutPat(..), HsLit(..), Fixity,
Match, HsBinds, Stmt, DoOrListComp, HsType, ArithSeqInfo )
import TcHsSyn ( SYN_IE(TypecheckedPat) )
import DsHsSyn ( outPatType, collectTypedPatBinders )
import CmdLineOpts ( opt_PprUserLength )
import CoreSyn
import DsMonad
import CoreUtils ( coreExprType, mkCoreIfThenElse )
import PprStyle ( PprStyle(..) )
import PrelVals ( iRREFUT_PAT_ERROR_ID, voidId )
import Pretty ( Doc, hcat, text )
import Id ( idType, dataConArgTys,
......@@ -62,9 +62,8 @@ import Util ( panic, assertPanic{-, pprTrace ToDo:rm-} )
import Unique ( Unique )
import Usage ( SYN_IE(UVar) )
import SrcLoc ( SrcLoc {- instance Outputable -} )
#if __GLASGOW_HASKELL__ >= 202
import Outputable
#endif
\end{code}
......@@ -346,7 +345,7 @@ mkErrorAppDs :: Id -- The error function
mkErrorAppDs err_id ty msg
= getSrcLocDs `thenDs` \ src_loc ->
let
full_msg = show (hcat [ppr PprForUser src_loc, text "|", text msg])
full_msg = show (hcat [ppr (PprForUser opt_PprUserLength) src_loc, text "|", text msg])
msg_lit = NoRepStr (_PK_ full_msg)
in
returnDs (mkApp (Var err_id) [] [ty] [LitArg msg_lit])
......@@ -402,7 +401,7 @@ mkSelectorBinds pat val_expr
is_var_pat (VarPat v) = True
is_var_pat other = False -- Even wild-card patterns aren't acceptable
pat_string = show (ppr PprForUser pat)
pat_string = show (ppr (PprForUser opt_PprUserLength) pat)
\end{code}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment