#1226: Add flags --full-flag-help and --print-docdir
-----------------------------+----------------------------------------------
Reporter: igloo | Owner: igloo
Type: feature request | Status: new
Priority: normal | Milestone: 6.8 branch
Component: Driver | Version: 6.6
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
-----------------------------+----------------------------------------------
Comment (by guest):
Replying to [comment:7 simonmar]:
> I was tempted to turn the man page into `.txt` and spit that out in
response to `ghc --full-help` or whatever. Then you have `grep` and
`more` to inspect the output. Isn't that much simpler?
a `.txt` version of `ghc.1` might be useful as response to `ghc --help`
(merging usage and man page), or even as a separate `--full-help`. but it
doesn't help much with finding flags:
* grep is find on windows, but the man page isn't really suited for
either, due to each flag spanning several lines
* more on windows doesn't seem to support search
* finding sections is more a job for awk's `/begin/,/end/` than for grep,
and is awkward even on unix, more so on windows (without awk)
you'll find that the `flagref.txt` is both simpler to generate than the
man page and simpler in format (one line per flag, making it suitable for
grep/find, and for simple substring matching in `Main.hs`). and since the
substring matching is built-in, usage requires neither grep, nor find, nor
more, nor awk. what could be simpler than that? and how would you do
things like the following three queries with your man-page to `.txt`
suggestion, with only windows tools?
{{{
$ /cygdrive/c/fptools/ghc/compiler/stage2/ghc-inplace --flags :@
Flag reference
Help and verbosity options
Which phases to run
Alternative modes of operation
Redirecting output
Keeping intermediate files
Temporary files
Finding imports
Interface file options
Recompilation checking
Interactive-mode options
Packages
Language options
Warnings
Optimisation levels
Individual optimisations
Profiling options
Program coverage options
Haskell pre-processor options
C pre-processor options
C compiler options
Code generation options
Linking options
Replacing phases
Forcing options to particular phases
Platform-specific options
External core file options
Compiler debugging options
Misc compiler options
$ /cygdrive/c/fptools/ghc/compiler/stage2/ghc-inplace --flags Interactive:
Interactive-mode options
Flag | Description | Static/Dynamic | Reverse
-ignore-dot-ghci | Disable reading of .ghci files | static | -
-read-dot-ghci | Enable reading of .ghci files | static | -
-fbreak-on-exception | Break on any exception thrown | dynamic | -fno-
break-on-exception
-fbreak-on-error | Break on uncaught exceptions and errors | dynamic |
-fno-break-on-error
-fprint-evld-with-show | Enable usage of Show instances in :print |
dynamic | -fno-print-evld-with-show
-fno-print-bind-result | Turn off printing of binding results in GHCi |
dynamic | -
$ /cygdrive/c/fptools/ghc/compiler/stage2/ghc-inplace --flags :type
Flag reference
Help and verbosity options
Which phases to run
Alternative modes of operation
Redirecting output
Keeping intermediate files
Temporary files
Finding imports
Interface file options
Recompilation checking
Interactive-mode options
Packages
Language options
-XGADTs | Enable generalised algebraic data types. | dynamic | -XNoGADTs
-XTypeFamilies | Enable type families. | dynamic | -XNoTypeFamilies
-XScopedTypeVariables | Enable lexically-scoped type variables. Implied
by -fglasgow-exts. | dynamic | -XNoScopedTypeVariables
-XPatternSignatures | Enable pattern type signatures. | dynamic |
-XNoPatternSignatures
-XUnliftedFFITypes | Enable unlifted FFI types. | dynamic |
-XNoUnliftedFFITypes
-XLiberalTypeSynonyms | Enable liberalised type synonyms. | dynamic |
-XNoLiberalTypeSynonyms
-XNoRank2Types | Enable rank-2 types. | dynamic | -XNoRank2Types
-XRankNTypes | Enable rank-N types. | dynamic | -XNoRankNTypes
-XTypeOperators | Enable type operators. | dynamic | -XNoTypeOperators
-XGeneralizedNewtypeDeriving | Enable newtype deriving. | dynamic |
-XNoGeneralizedNewtypeDeriving
-XTypeSynonymInstances | Enable type synonyms. | dynamic |
-XNoTypeSynonymInstances
-XMultiParamTypeClasses | Enable multi parameter type classes. | dynamic
| -XNoMultiParamTypeClasses
Warnings
-fwarn-deprecations | warn about uses of functions & types that are
deprecated | dynamic | -fno-warn-deprecations
-fwarn-type-defaults | warn when defaulting happens | dynamic | -fno-
warn-type-defaults
Optimisation levels
Individual optimisations
Profiling options
Program coverage options
Haskell pre-processor options
C pre-processor options
C compiler options
Code generation options
Linking options
Replacing phases
Forcing options to particular phases
Platform-specific options
External core file options
Compiler debugging options
-ddump-tc | Dump typechecker output | dynamic | -
-ddump-types | Dump type signatures | dynamic | -
-ddump-tc-trace | Trace typechecker | dynamic | -
Misc compiler options
}}}
claus
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1226#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs