summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-11-12 10:18:03 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-11-21 01:13:26 -0500
commit56804e33a05729f5a5340d3680ae2849e30a9e86 (patch)
tree652d4b1bcf63259c685eebd765c197f07207a7fe
parent2a8a979c24fe34a81a438ae179693ddaca12709f (diff)
downloadhaskell-56804e33a05729f5a5340d3680ae2849e30a9e86.tar.gz
testsuite: Refactor CountParserDeps
-rw-r--r--testsuite/tests/parser/should_run/CountParserDeps.hs8
-rw-r--r--testsuite/tests/parser/should_run/CountParserDeps.stdout236
2 files changed, 238 insertions, 6 deletions
diff --git a/testsuite/tests/parser/should_run/CountParserDeps.hs b/testsuite/tests/parser/should_run/CountParserDeps.hs
index a676fe79cc..ff23263e6f 100644
--- a/testsuite/tests/parser/should_run/CountParserDeps.hs
+++ b/testsuite/tests/parser/should_run/CountParserDeps.hs
@@ -29,12 +29,8 @@ main = do
[libdir] <- getArgs
modules <- parserDeps libdir
let num = sizeUniqSet modules
- max_num = 234
- min_num = max_num - 10 -- so that we don't forget to change the number
- -- when the number of dependencies decreases
- -- putStrLn $ "Found " ++ show num ++ " parser module dependencies"
- -- forM_ (map moduleNameString $ nonDetEltsUniqSet modules) putStrLn
- unless (num <= max_num && num >= min_num) $ exitWith (ExitFailure num)
+ putStrLn $ "Found " ++ show num ++ " parser module dependencies"
+ forM_ (map moduleNameString $ nonDetEltsUniqSet modules) putStrLn
parserDeps :: FilePath -> IO (UniqSet ModuleName)
parserDeps libdir =
diff --git a/testsuite/tests/parser/should_run/CountParserDeps.stdout b/testsuite/tests/parser/should_run/CountParserDeps.stdout
new file mode 100644
index 0000000000..9e810ce68c
--- /dev/null
+++ b/testsuite/tests/parser/should_run/CountParserDeps.stdout
@@ -0,0 +1,236 @@
+Found 235 parser module dependencies
+GHC.Builtin.Names
+GHC.Builtin.PrimOps
+GHC.Builtin.Types
+GHC.Builtin.Types.Prim
+GHC.Builtin.Uniques
+GHC.ByteCode.Types
+GHC.Cmm
+GHC.Cmm.BlockId
+GHC.Cmm.CLabel
+GHC.Cmm.Dataflow.Block
+GHC.Cmm.Dataflow.Collections
+GHC.Cmm.Dataflow.Graph
+GHC.Cmm.Dataflow.Label
+GHC.Cmm.Expr
+GHC.Cmm.MachOp
+GHC.Cmm.Node
+GHC.Cmm.Switch
+GHC.Cmm.Type
+GHC.CmmToAsm.CFG.Weight
+GHC.CmmToAsm.Config
+GHC.Core
+GHC.Core.Class
+GHC.Core.Coercion
+GHC.Core.Coercion.Axiom
+GHC.Core.Coercion.Opt
+GHC.Core.ConLike
+GHC.Core.DataCon
+GHC.Core.FVs
+GHC.Core.FamInstEnv
+GHC.Core.InstEnv
+GHC.Core.Lint
+GHC.Core.Make
+GHC.Core.Map
+GHC.Core.Multiplicity
+GHC.Core.Opt.Arity
+GHC.Core.Opt.CallerCC
+GHC.Core.Opt.ConstantFold
+GHC.Core.Opt.Monad
+GHC.Core.Opt.OccurAnal
+GHC.Core.PatSyn
+GHC.Core.Ppr
+GHC.Core.Predicate
+GHC.Core.Seq
+GHC.Core.SimpleOpt
+GHC.Core.Stats
+GHC.Core.Subst
+GHC.Core.TyCo.FVs
+GHC.Core.TyCo.Ppr
+GHC.Core.TyCo.Rep
+GHC.Core.TyCo.Subst
+GHC.Core.TyCo.Tidy
+GHC.Core.TyCon
+GHC.Core.TyCon.Env
+GHC.Core.TyCon.RecWalk
+GHC.Core.Type
+GHC.Core.Unfold
+GHC.Core.Unfold.Make
+GHC.Core.Unify
+GHC.Core.UsageEnv
+GHC.Core.Utils
+GHC.CoreToIface
+GHC.Data.Bag
+GHC.Data.BooleanFormula
+GHC.Data.EnumSet
+GHC.Data.FastMutInt
+GHC.Data.FastString
+GHC.Data.FastString.Env
+GHC.Data.FiniteMap
+GHC.Data.Graph.Directed
+GHC.Data.IOEnv
+GHC.Data.List.SetOps
+GHC.Data.Maybe
+GHC.Data.OrdList
+GHC.Data.Pair
+GHC.Data.Stream
+GHC.Data.StringBuffer
+GHC.Data.TrieMap
+GHC.Driver.Backend
+GHC.Driver.Backpack.Syntax
+GHC.Driver.CmdLine
+GHC.Driver.Env
+GHC.Driver.Flags
+GHC.Driver.Hooks
+GHC.Driver.Monad
+GHC.Driver.Phases
+GHC.Driver.Pipeline.Monad
+GHC.Driver.Plugins
+GHC.Driver.Ppr
+GHC.Driver.Session
+GHC.Hs
+GHC.Hs.Binds
+GHC.Hs.Decls
+GHC.Hs.Doc
+GHC.Hs.Expr
+GHC.Hs.Extension
+GHC.Hs.ImpExp
+GHC.Hs.Instances
+GHC.Hs.Lit
+GHC.Hs.Pat
+GHC.Hs.Type
+GHC.Hs.Utils
+GHC.Iface.Ext.Fields
+GHC.Iface.Recomp.Binary
+GHC.Iface.Syntax
+GHC.Iface.Type
+GHC.Linker.Types
+GHC.Parser
+GHC.Parser.Annotation
+GHC.Parser.CharClass
+GHC.Parser.Errors
+GHC.Parser.Lexer
+GHC.Parser.PostProcess
+GHC.Parser.PostProcess.Haddock
+GHC.Parser.Types
+GHC.Platform
+GHC.Platform.ARM
+GHC.Platform.ARM64
+GHC.Platform.Constants
+GHC.Platform.NoRegs
+GHC.Platform.PPC
+GHC.Platform.Profile
+GHC.Platform.Reg
+GHC.Platform.Reg.Class
+GHC.Platform.Regs
+GHC.Platform.S390X
+GHC.Platform.SPARC
+GHC.Platform.Ways
+GHC.Platform.X86
+GHC.Platform.X86_64
+GHC.Prelude
+GHC.Runtime.Context
+GHC.Runtime.Eval.Types
+GHC.Runtime.Heap.Layout
+GHC.Runtime.Interpreter.Types
+GHC.Settings
+GHC.Settings.Config
+GHC.Settings.Constants
+GHC.Stg.Syntax
+GHC.StgToCmm.Types
+GHC.SysTools.BaseDir
+GHC.SysTools.FileCleanup
+GHC.SysTools.Terminal
+GHC.Tc.Errors.Hole.FitTypes
+GHC.Tc.Types
+GHC.Tc.Types.Constraint
+GHC.Tc.Types.Evidence
+GHC.Tc.Types.Origin
+GHC.Tc.Utils.TcType
+GHC.Types.Annotations
+GHC.Types.Avail
+GHC.Types.Basic
+GHC.Types.CompleteMatch
+GHC.Types.CostCentre
+GHC.Types.CostCentre.State
+GHC.Types.Cpr
+GHC.Types.Demand
+GHC.Types.Error
+GHC.Types.FieldLabel
+GHC.Types.Fixity
+GHC.Types.Fixity.Env
+GHC.Types.ForeignCall
+GHC.Types.ForeignStubs
+GHC.Types.HpcInfo
+GHC.Types.Id
+GHC.Types.Id.Info
+GHC.Types.Id.Make
+GHC.Types.Literal
+GHC.Types.Meta
+GHC.Types.Name
+GHC.Types.Name.Cache
+GHC.Types.Name.Env
+GHC.Types.Name.Occurrence
+GHC.Types.Name.Ppr
+GHC.Types.Name.Reader
+GHC.Types.Name.Set
+GHC.Types.RepType
+GHC.Types.SafeHaskell
+GHC.Types.SourceError
+GHC.Types.SourceFile
+GHC.Types.SourceText
+GHC.Types.SrcLoc
+GHC.Types.Target
+GHC.Types.TyThing
+GHC.Types.TypeEnv
+GHC.Types.Unique
+GHC.Types.Unique.DFM
+GHC.Types.Unique.DSet
+GHC.Types.Unique.FM
+GHC.Types.Unique.Set
+GHC.Types.Unique.Supply
+GHC.Types.Var
+GHC.Types.Var.Env
+GHC.Types.Var.Set
+GHC.Unit
+GHC.Unit.External
+GHC.Unit.Finder.Types
+GHC.Unit.Home
+GHC.Unit.Home.ModInfo
+GHC.Unit.Info
+GHC.Unit.Module
+GHC.Unit.Module.Deps
+GHC.Unit.Module.Env
+GHC.Unit.Module.Graph
+GHC.Unit.Module.Imported
+GHC.Unit.Module.Location
+GHC.Unit.Module.ModDetails
+GHC.Unit.Module.ModGuts
+GHC.Unit.Module.ModIface
+GHC.Unit.Module.ModSummary
+GHC.Unit.Module.Name
+GHC.Unit.Module.Status
+GHC.Unit.Module.Warnings
+GHC.Unit.Parser
+GHC.Unit.Ppr
+GHC.Unit.State
+GHC.Unit.Types
+GHC.Utils.Binary
+GHC.Utils.Binary.Typeable
+GHC.Utils.BufHandle
+GHC.Utils.CliOption
+GHC.Utils.Error
+GHC.Utils.Exception
+GHC.Utils.FV
+GHC.Utils.Fingerprint
+GHC.Utils.GlobalVars
+GHC.Utils.IO.Unsafe
+GHC.Utils.Json
+GHC.Utils.Lexeme
+GHC.Utils.Misc
+GHC.Utils.Monad
+GHC.Utils.Outputable
+GHC.Utils.Panic
+GHC.Utils.Panic.Plain
+GHC.Utils.Ppr
+GHC.Utils.Ppr.Colour