diff options
author | Jan Stolarek <jan.stolarek@p.lodz.pl> | 2016-01-15 18:24:14 +0100 |
---|---|---|
committer | Jan Stolarek <jan.stolarek@p.lodz.pl> | 2016-01-15 18:31:46 +0100 |
commit | 5b4e52b508fc5ef40b38b9d32a9cbce6bf419016 (patch) | |
tree | e15571a0370aa7759a73ea0cd079699bcf61d073 /compiler/simplCore/SimplMonad.hs | |
parent | b90cac69b2abec7df998d1d447b3fe075eb8f15c (diff) | |
download | haskell-wip/ptext-sLit-cleanup.tar.gz |
Replace calls to `ptext . sLit` with `text`wip/ptext-sLit-cleanup
Summary:
In the past the canonical way for constructing an SDoc string literal was the
composition `ptext . sLit`. But for some time now we have function `text` that
does the same. Plus it has some rules that optimize its runtime behaviour.
This patch takes all uses of `ptext . sLit` in the compiler and replaces them
with calls to `text`. The main benefits of this patch are clener (shorter) code
and less dependencies between module, because many modules now do not need to
import `FastString`. I don't expect any performance benefits - we mostly use
SDocs to report errors and it seems there is little to be gained here.
Test Plan: ./validate
Reviewers: bgamari, austin, goldfire, hvr, alanz
Subscribers: goldfire, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D1784
Diffstat (limited to 'compiler/simplCore/SimplMonad.hs')
-rw-r--r-- | compiler/simplCore/SimplMonad.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/simplCore/SimplMonad.hs b/compiler/simplCore/SimplMonad.hs index f165c65db5..074d13b680 100644 --- a/compiler/simplCore/SimplMonad.hs +++ b/compiler/simplCore/SimplMonad.hs @@ -200,14 +200,14 @@ checkedTick t else let sc' = doSimplTick (st_flags st_env) t sc in sc' `seq` return ((), us, sc')) where - msg sc = vcat [ ptext (sLit "When trying") <+> ppr t - , ptext (sLit "To increase the limit, use -fsimpl-tick-factor=N (default 100)") - , ptext (sLit "If you need to do this, let GHC HQ know, and what factor you needed") + msg sc = vcat [ text "When trying" <+> ppr t + , text "To increase the limit, use -fsimpl-tick-factor=N (default 100)" + , text "If you need to do this, let GHC HQ know, and what factor you needed" , pp_details sc , pprSimplCount sc ] pp_details sc | hasDetailedCounts sc = empty - | otherwise = ptext (sLit "To see detailed counts use -ddump-simpl-stats") + | otherwise = text "To see detailed counts use -ddump-simpl-stats" freeTick :: Tick -> SimplM () |