diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-02-03 17:57:29 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-02-20 21:18:48 -0500 |
commit | 6880d6aa1e6e96579bbff89712efd813489cc828 (patch) | |
tree | f2156d5a5c168bf28ee569a62a74b51adf74dac9 /compiler/GHC/HsToCore/Expr.hs | |
parent | 74ad75e87317196c600dfabc61aee1b87d95c214 (diff) | |
download | haskell-6880d6aa1e6e96579bbff89712efd813489cc828.tar.gz |
Disentangle DynFlags and SDoc
Remove several uses of `sdocWithDynFlags`. The remaining ones are mostly
CodeGen related (e.g. depend on target platform constants) and will be
fixed separately.
Metric Decrease:
T12425
T9961
WWRec
T1969
T14683
Diffstat (limited to 'compiler/GHC/HsToCore/Expr.hs')
-rw-r--r-- | compiler/GHC/HsToCore/Expr.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/GHC/HsToCore/Expr.hs b/compiler/GHC/HsToCore/Expr.hs index 0d927e4e59..f400a1fdf1 100644 --- a/compiler/GHC/HsToCore/Expr.hs +++ b/compiler/GHC/HsToCore/Expr.hs @@ -1191,12 +1191,11 @@ levPolyPrimopErr expr_doc ty bad_tys = errDs $ vcat [ hang (text "Cannot use function with levity-polymorphic arguments:") 2 (expr_doc <+> dcolon <+> pprWithTYPE ty) - , sdocWithDynFlags $ \dflags -> - if not (gopt Opt_PrintTypecheckerElaboration dflags) then vcat + , ppUnlessOption sdocPrintTypecheckerElaboration $ vcat [ text "(Note that levity-polymorphic primops such as 'coerce' and unboxed tuples" , text "are eta-expanded internally because they must occur fully saturated." , text "Use -fprint-typechecker-elaboration to display the full expression.)" - ] else empty + ] , hang (text "Levity-polymorphic arguments:") 2 $ vcat $ map (\t -> pprWithTYPE t <+> dcolon <+> pprWithTYPE (typeKind t)) |