
#12822: Cleanup GHC verbosity flags -------------------------------------+------------------------------------- Reporter: hsyl20 | Owner: (none) Type: task | Status: new Priority: low | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: | newcomer,flags Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Let's first define specifically which flags we are talking about changing here; there are currently several broad categories that one might consider "verbosity" flags, * the dump (`-d*`) flags; these are currently handled uniformly within just and are represented by the `DynFlags.DumpFlags` type. * the `-fprint-*` flags * the `-fshow-options` flag * the `-v<n>` flags * the as-of-yet non-existent flags which denote the individual effects currently controlled by the `-v<n>` flags What concretely would you like to do with these flags? It's not entirely clear to me that, for instance, unifying the `-d*` flags with the `-fprint-*` flags is a good idea; afterall, the former are meant for developers while the latter are for users. Regarding the refactoring bit of (1): There should be no need to add a constructor to `DynFlags` (which is essentially just a product of all of the user-specified configuration GHC needs). You should have a look at how the `-On` flags are currently implemented; namely look at references to `optLevel` in `DynFlags`. Of particular interest will be `DynFlags.optLevelFlags`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12822#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler