<options> in users_guide vs flags

Claus Reinke claus.reinke at talk21.com
Wed Jun 11 12:23:03 EDT 2008


following up on some discussion in #1880, i was wondering whether
one might be able to filter uses of options in the users guide and
compare for consistency with the flag reference.

extracting <option>opt</option> is easy, but there is no tag to 
distinguish ghc options from others (such as rts, ghc-pkg, ..).
also, there is no guarantee that <option> is used consistently.

if these two issues could be addressed, it might be quite possible
to get an automated cross-check. even now, with some squinting
using some editor's diff-view, one can see a few things (no idea
whether they are significant), including:

- there are some deprecated? flag forms that appear elsewhere
    in the users guide, but not in the flag reference
    (-ddump-workwrap, -dshow-rn-stats, -dshow-unused-imports,
      -f.. vs -X..) 
    
- there are some flags that do not appear in the flag reference
    (-ddump-mod-cycles, -dverbose-simpl, -fextended-default-rules,
    -fglobalise-toplev-names, -finline-phase, -funfolding-con-discount,
    -fwarn-dodgy-imports, -ignore-scc, -no-recomp, -parallel,
    -shared)
    
- there are some misspellings (-monly-N-regs, -monly-[32]-regs,
    -XMonomorphismRrestriction) and odd characters apparently
    inserted for &ndash;, used instead of or in addition to '-' (eg,
    in using.xml).

attached a little hack, consisting of bits of xsl, sed, perl, sh
(the shell script is meant to be run just outside ghc/, so that
ghc/docs/users_guide/ means the right thing, check the script
before use, please!):

options.xsl:         extract <option>opt</option> form xml
options-diff.sh:    apply xsltproc to users_guide.xml and
                            flags.xml, process results with perl to
                            generate files options.txt and flags.txt
                            (script doesn't actually do the diff, as
                            you probably want to use a diff viewer)

perhaps you could replace this with a cleaned up version
and keep it in the tree?

options.txt/flags.txt: example output for those without xsltproc.

anyway, hope this might be of some use,
claus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: options.xsl
Type: text/xml
Size: 326 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/cvs-ghc/attachments/20080611/c55d3a06/options.xml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: options-diff.sh
Type: application/octet-stream
Size: 895 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/cvs-ghc/attachments/20080611/c55d3a06/options-diff.obj
-------------- next part --------------
-#include
--info
--interactive
--make
--mk-dll
--numeric-version
--print-libdir
--show-iface
--supported-languages
--version
-?
-C
-D
-E
-F
-H
-I
-L
-M
-O
-O0
-O2
-Rghc-timing
-S
-U
-V
-W
-Wall
-Werror
-Wwarn
-XArrows
-XBangPatterns
-XCPP
-XConstrainedClassMethods
-XDeriveDataTypeable
-XDisambiguateRecordFields
-XEmptyDataDecls
-XExistentialQuantification
-XExtendedDefaultRules
-XFlexibleContexts
-XFlexibleInstances
-XForeignFunctionInterface
-XFunctionalDependencies
-XGADTs
-XGeneralizedNewtypeDeriving
-XGenerics
-XImplicitParams
-XImplicitPrelude
-XImpredicativeTypes
-XIncoherentInstances
-XKindSignatures
-XLiberalTypeSynonyms
-XMagicHash
-XMonoPatBinds
-XMonomorphismRestriction
-XMonomorphismRrestriction
-XMultiParamTypeClasses
-XOverlappingInstances
-XOverloadedStrings
-XPArr
-XParallelListComp
-XPatternGuards
-XPatternSignatures
-XPolymorphicComponents
-XQuasiQuotes
-XRank2Types
-XRankNTypes
-XRecordPuns
-XRecordWildCards
-XRecursiveDo
-XRelaxedPolyRec
-XScopedTypeVariables
-XStandaloneDeriving
-XTemplateHaskell
-XTransformListComp
-XTypeFamilies
-XTypeOperators
-XTypeSynonymInstances
-XUnboxedTuples
-XUndecidableInstances
-XUnicodeSyntax
-XUnliftedFFITypes
-XViewPatterns
-auto
-auto-all
-c
-caf-all
-cpp
-dcmm-lint
-dcore-lint
-ddump-X
-ddump-asm
-ddump-bcos
-ddump-cmm
-ddump-cpranal
-ddump-cse
-ddump-deriv
-ddump-ds
-ddump-flatC
-ddump-foreign
-ddump-hi
-ddump-hi-diffs
-ddump-hpc
-ddump-if-trace
-ddump-inlinings
-ddump-minimal-imports
-ddump-occur-anal
-ddump-opt-cmm
-ddump-parsed
-ddump-prep
-ddump-rn
-ddump-rn-stats
-ddump-rn-trace
-ddump-rules
-ddump-simpl
-ddump-simpl-iterations
-ddump-simpl-phases
-ddump-simpl-stats
-ddump-spec
-ddump-splices
-ddump-stg
-ddump-stranal
-ddump-tc
-ddump-tc-trace
-ddump-types
-ddump-worker-wrapper
-debug
-dfaststring-stats
-dno-black-holing
-dppr-debug
-dppr-noprags
-dppr-user-length
-dshow-passes
-dsource-stats
-dstg-lint
-dstg-stats
-dverbose-core2core
-dverbose-stg2stg
-dynamic
-e
-fPIC
-fasm
-fasm-mangling
-fbreak-on-error
-fbreak-on-exception
-fbyte-code
-fcase-merge
-fcode
-fcontext-stack
-fcse
-fdicts-strict
-fdisambiguate-record-fields
-fdo-eta-reduction
-fdo-lambda-eta-expansion
-fembed-manifest
-ferror-spans
-fexcess-precision
-fext-core
-fforce-recomp
-ffull-laziness
-fgen-manifest
-fglasgow-exts
-fhi-version-check
-fhistory-size
-fhpc
-fignore-asserts
-fignore-interface-pragmas
-firrefutable-tuples
-fliberate-case
-fliberate-case-threshold
-fmax-simplifier-iterations
-fmax-worker-args
-fmethod-sharing
-fobject-code
-fomit-interface-pragmas
-fpre-inlining
-fprint-bind-contents
-fprint-bind-result
-fprint-evld-with-show
-framework
-framework-path
-frewrite-rules
-fsimplifier-phases
-fspec-constr
-fspec-constr-count
-fspec-constr-threshold
-fstate-hack
-fstatic-argument-transformation
-fstrictness
-funbox-strict-fields
-funfolding-creation-threshold
-funfolding-fun-discount
-funfolding-keeness-factor
-funfolding-use-threshold
-funregisterised
-fvia-C
-fwarn-deprecations
-fwarn-duplicate-exports
-fwarn-hi-shadowing
-fwarn-implicit-prelude
-fwarn-incomplete-patterns
-fwarn-incomplete-record-updates
-fwarn-missing-fields
-fwarn-missing-methods
-fwarn-missing-signatures
-fwarn-monomorphism-restriction
-fwarn-name-shadowing
-fwarn-orphans
-fwarn-overlapping-patterns
-fwarn-simple-patterns
-fwarn-tabs
-fwarn-type-defaults
-fwarn-unused-binds
-fwarn-unused-imports
-fwarn-unused-matches
-hcsuf
-help
-hide-all-packages
-hide-package
-hidir
-hisuf
-hpcdir
-i
-ignore-dot-ghci
-ignore-package
-keep-hc-file
-keep-hc-files
-keep-raw-s-file
-keep-raw-s-files
-keep-s-file
-keep-s-files
-keep-tmp-files
-l
-main-is
-monly-[432]-regs
-n
-no-auto
-no-auto-all
-no-caf-all
-no-hs-main
-no-link
-no-user-package-conf
-o
-odir
-ohi
-optF
-optL
-optP
-opta
-optc
-optdep
-optdll
-optl
-optm
-optwindres
-osuf
-package
-package-conf
-package-name
-pgmF
-pgmL
-pgmP
-pgma
-pgmc
-pgmdll
-pgml
-pgmm
-pgms
-pgmwindres
-prof
-read-dot-ghci
-split-objs
-static
-stubdir
-threaded
-ticky
-tmpdir
-unreg
-v
-v3
-w
-x
-------------- next part --------------
+RTS
-#include
--RTS
--global
--help
--info
--install-signal-handlers
--interactive
--make
--mk-dll
--numeric-version
--package-conf
--print-libdir
--show-iface
--simple-output
--user
--version
-?
-A
-A<size>
-B
-C
-C0
-Cs
-D
-E
-Ewurble
-F
-G
-G1
-H
-H<size>
-I
-I0
-K
-L
-Lnum
-M
-M<size>
-N
-Nx
-O
-O*
-O0
-O1
-O2
-Ofile
-P
-R
-RTS
-Rghc-timing
-S
-U
-V
-Vsecs
-W
-Wall
-Werror
-Wwarn
-X
-XArrows
-XBangPatterns
-XCPP
-XConstrainedClassMethods
-XDeriveDataTypeable
-XDisambiguateRecordFields
-XEmptyDataDecls
-XExistentialQuantification
-XExtendedDefaultRules
-XFlexibleContexts
-XFlexibleInstances
-XForeignFunctionInterface
-XFunctionalDependencies
-XGADTs
-XGeneralizedNewtypeDeriving
-XGenerics
-XImplicitParams
-XImplicitPrelude
-XImpredicativeTypes
-XIncoherentInstances
-XKindSignatures
-XLiberalTypeSynonyms
-XMagicHash
-XMonoPatBinds
-XMonomorphismRestriction
-XMonomorphismRrestriction
-XMultiParamTypeClasses
-XOverlappingInstances
-XOverloadedStrings
-XPArr
-XParallelListComp
-XPatternGuards
-XPatternSignatures
-XPolymorphicComponents
-XQuasiQuotes
-XRank2Types
-XRankNTypes
-XRecordPuns
-XRecordWildCards
-XRecursiveDo
-XRelaxedPolyRec
-XScopedTypeVariables
-XStandaloneDeriving
-XTemplateHaskell
-XTransformListComp
-XTypeFamilies
-XTypeOperators
-XTypeSynonymInstances
-XUnboxedTuples
-XUndecidableInstances
-XUnicodeSyntax
-XUnliftedFFITypes
-XViewPatterns
-Z
-auto
-auto-all
-b
-c
-caf-all
-cpp
-d
-dcmm-lint
-dcore-lint
-ddump
-ddump-
-ddump-X
-ddump-asm
-ddump-bcos
-ddump-cmm
-ddump-cpranal
-ddump-cse
-ddump-deriv
-ddump-ds
-ddump-flatC
-ddump-foreign
-ddump-hi
-ddump-hi-diffs
-ddump-hpc
-ddump-if-trace
-ddump-inlinings
-ddump-minimal-imports
-ddump-mod-cycles
-ddump-occur-anal
-ddump-opt-cmm
-ddump-parsed
-ddump-prep
-ddump-rn
-ddump-rn-stats
-ddump-rn-trace
-ddump-rules
-ddump-simpl
-ddump-simpl-iterations
-ddump-simpl-phases
-ddump-simpl-stats
-ddump-spec
-ddump-splices
-ddump-stg
-ddump-stranal
-ddump-tc
-ddump-tc-trace
-ddump-types
-ddump-worker-wrapper
-ddump-workwrap
-debug
-dfaststring-stats
-dno-black-holing
-dppr-debug
-dppr-noprags
-dppr-user-length
-dshow-passes
-dshow-rn-stats
-dshow-unused-imports
-dsource-stats
-dstg-lint
-dstg-stats
-dverbose-core2core
-dverbose-simpl
-dverbose-stg2stg
-dynamic
-e
-e<float>[in|mm|pt]
-f
-f*
-fPIC
-fallow-incoherent-instances
-fallow-overlapping-instances
-fallow-undecidable-instances
-fasm
-fasm-mangling
-fbreak-on-error
-fbreak-on-exception
-fbyte-code
-fcase-merge
-fcode
-fcontext-stack
-fcse
-fdicts-strict
-fdisambiguate-record-fields
-fdo-eta-reduction
-fdo-lambda-eta-expansion
-fembed-manifest
-ferror-spans
-fexcess-precision
-fext-core
-fextended-default-rules
-fffi
-fforce-recomp
-ffull-laziness
-fgen-manifest
-fglasgow-exts
-fglobalise-toplev-names
-fhi-version-check
-fhistory-size
-fhpc
-fignore-asserts
-fignore-interface-pragmas
-fimplicit-prelude
-finline-phase
-firrefutable-tuples
-fliberate-case
-fliberate-case-threshold
-fmax-simplifier-iterations
-fmax-worker-args
-fmethod-sharing
-fmono-pat-binds
-fobject-code
-fomit-interface-pragmas
-fpre-inlining
-fprint-bind-contents
-fprint-bind-result
-fprint-evld-with-show
-framework
-framework-path
-frewrite-rules
-fsimplifier-phases
-fspec-constr
-fspec-constr-count
-fspec-constr-threshold
-fstate-hack
-fstatic-argument-transformation
-fstrictness
-funbox-strict-fields
-funfolding-con-discount
-funfolding-creation-threshold
-funfolding-fun-discount
-funfolding-keeness-factor
-funfolding-use-threshold
-funfolding-use-threshold0
-funregisterised
-fvia-C
-fwarn-...
-fwarn-deprecations
-fwarn-dodgy-imports
-fwarn-duplicate-exports
-fwarn-hi-shadowing
-fwarn-implicit-prelude
-fwarn-incomplete-patterns
-fwarn-incomplete-record-updates
-fwarn-missing-fields
-fwarn-missing-methods
-fwarn-missing-signatures
-fwarn-monomorphism-restriction
-fwarn-name-shadowing
-fwarn-orphans
-fwarn-overlapping-patterns
-fwarn-simple-patterns
-fwarn-tabs
-fwarn-type-defaults
-fwarn-unused-binds
-fwarn-unused-imports
-fwarn-unused-matches
-g
-h<break-down>
-hC
-hb
-hc
-hcsuf
-hd
-help
-hi-diffs
-hide-all-packages
-hide-package
-hidir
-hisuf
-hm
-hpcdir
-hr
-hy
-i
-i0.2
-idirs
-ignore-dot-ghci
-ignore-package
-ignore-scc
-isecs
-k
-keep-hc-file
-keep-hc-files
-keep-raw-s-file
-keep-raw-s-files
-keep-s-file
-keep-s-files
-keep-tmp-files
-l
-lHSfoo
-lHSfoo.dll
-lHSrts
-lm
-m
-m*
-m0
-m<int>
-main-is
-monly-N-regs
-monly-[32]-regs
-monly-[432]-regs
-n
-no-auto
-no-auto-all
-no-caf-all
-no-hs-main
-no-link
-no-recomp
-no-user-package-conf
-o
-odir
-ohi
-ohidir
-optF
-optL
-optP
-opta
-opta-Ewurble
-optc
-optc-Dfoo
-optdep
-optdll
-optl
-optm
-optwindres
-osuf
-p
-package
-package-conf
-package-name
-parallel
-pgmF
-pgmF cmd
-pgmL
-pgmP
-pgma
-pgmc
-pgmdll
-pgml
-pgmm
-pgms
-pgmwindres
-prof
-r
-read-dot-ghci
-s
-shared
-split-objs
-static
-stubdir
-t
-t0
-t<float>
-tfile
-threaded
-ticky
-tmpdir
-unreg
-v
-v0
-v1
-v2
-v3
-v4
-v5
-vO
-w
-x
-xc
-xt
-y
DEBUG
No
files
–shared
––--show-iface
––RTS
––auto-ghci-libs
––exclude-module
––force
––global
––help
––include-pkg-deps
––info
––interactive
––make
––numeric-version
––print-libdir
––supported-languages
––user
––version


More information about the Cvs-ghc mailing list