diff options
author | M Farkas-Dyck <strake888@proton.me> | 2022-09-18 20:23:23 -0800 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-08 12:53:55 -0500 |
commit | 68f49874aa217c2222c80c596ef11ffd992b459a (patch) | |
tree | 215cafabd967e33b9d1c70182474d3690d1767fa /compiler/GHC/Parser | |
parent | 5fe11fe612e1881bd4d1b9d5950d0d801e08e159 (diff) | |
download | haskell-68f49874aa217c2222c80c596ef11ffd992b459a.tar.gz |
Define `Infinite` list and use where appropriate.
Also add perf test for infinite list fusion.
In particular, in `GHC.Core`, often we deal with infinite lists of roles. Also in a few locations we deal with infinite lists of names.
Thanks to simonpj for helping to write the Note [Fusion for `Infinite` lists].
Diffstat (limited to 'compiler/GHC/Parser')
-rw-r--r-- | compiler/GHC/Parser/Errors/Ppr.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Parser/Errors/Ppr.hs b/compiler/GHC/Parser/Errors/Ppr.hs index 1263d5104b..65e2695f66 100644 --- a/compiler/GHC/Parser/Errors/Ppr.hs +++ b/compiler/GHC/Parser/Errors/Ppr.hs @@ -31,7 +31,7 @@ import GHC.Data.FastString import GHC.Data.Maybe (catMaybes) import GHC.Hs.Expr (prependQualified, HsExpr(..), LamCaseVariant(..), lamCaseKeyword) import GHC.Hs.Type (pprLHsContext) -import GHC.Builtin.Names (allNameStrings) +import GHC.Builtin.Names (allNameStringList) import GHC.Builtin.Types (filterCTuple) import qualified GHC.LanguageExtensions as LangExt import Data.List.NonEmpty (NonEmpty((:|))) @@ -486,7 +486,7 @@ instance Diagnostic PsMessage where , nest 2 (what <+> tc' - <+> hsep (map text (takeList tparms allNameStrings)) + <+> hsep (map text (takeList tparms allNameStringList)) <+> equals_or_where) ] ] where -- Avoid printing a constraint tuple in the error message. Print |