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 )
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) )
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
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,
import Unique ( Unique )
import Usage ( SYN_IE(UVar) )
import SrcLoc ( SrcLoc {- instance Outputable -} )
-#if __GLASGOW_HASKELL__ >= 202
+
import Outputable
-#endif
\end{code}
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])
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}