Commit 69aad50c authored by claus.reinke@talk21.com's avatar claus.reinke@talk21.com
Browse files

simplify ghci024.py, fix -fprint-bind-result, -fno-ignore-breakpoints, -fprint-bind-contents

- as ghc 6.9 flags are beginning to diverge, we need
  a simpler way of specifying version-specific flags
  or settings: have two entirely separate sections,
  instead of one section with too many patches.

  even if that doubles the script size, it should
  be easier to edit. also add a warning that 
  ghci024.stdout is a generated file.

- default for -fprint-bind-result has changed

- -fno-ignore-breakpoints is gone

- -fprint-bind-contents is new
parent 04328477
......@@ -3,8 +3,9 @@ import re
# prepare version-/platform-specific ghci024.stdout
# - listen to ghci -package ghc, to figure out package ghc contents for :show packages
# - drop new flags for old ghc
# - change flag defaults according to platform (unregistered -> -fno-asm-mangling)
# - prepare separate flag lists for 6.9 or earlier
# (please make sure to add your flags to the right section!)
#
def prepare024( opts ):
h = os.popen('echo :q | '+config.compiler+' --interactive -package ghc ')
......@@ -23,14 +24,112 @@ def prepare024( opts ):
mangling = ''
if version_lt(config.compiler_version, '6.9') :
new_flags = ''
else:
new_flags = """\
-fno-run-cps
-fno-convert-to-zipper-and-back
"""
outtext = """\
-- ghci024.stdout is a generated file! please edit ghci024.py instead.
options currently set: none.
GHCi-specific dynamic flag settings:
-fno-print-explicit-foralls
-fprint-bind-result
-fno-break-on-exception
-fno-break-on-error
-fno-print-evld-with-show
other dynamic, non-language, flag settings:
-fno-warn-dodgy-imports
-fwarn-duplicate-exports
-fno-warn-hi-shadowing
-fno-warn-implicit-prelude
-fno-warn-incomplete-patterns
-fno-warn-incomplete-record-updates
-fwarn-missing-fields
-fwarn-missing-methods
-fno-warn-missing-signatures
-fno-warn-name-shadowing
-fwarn-overlapping-patterns
-fno-warn-simple-patterns
-fno-warn-type-defaults
-fno-warn-monomorphism-restriction
-fno-warn-unused-binds
-fno-warn-unused-imports
-fno-warn-unused-matches
-fwarn-deprecations
-fno-warn-orphans
-fno-warn-tabs
-fno-strictness
-fno-full-laziness
-fno-liberate-case
-fno-spec-constr
-fno-cse
-fignore-interface-pragmas
-fomit-interface-pragmas
-fdo-lambda-eta-expansion
-fno-ignore-asserts
-fno-ignore-breakpoints
-fno-do-eta-reduction
-fno-case-merge
-fno-unbox-strict-fields
-fno-dicts-cheap
-fno-excess-precision
-f%(mangling)sasm-mangling
-fno-force-recomp
-fno-hpc-no-auto
-fno-rewrite-rules
-fno-vectorise
-fno-regs-graph
-fno-regs-iterative
-fgen-manifest
-fembed-manifest
active language flags:
-XImplicitPrelude
-XMonomorphismRestriction
-XMonoPatBinds
-- :set -fglasgow-exts
active language flags:
-XPatternGuards
-XUnicodeSyntax
-XMagicHash
-XPolymorphicComponents
-XExistentialQuantification
-XKindSignatures
-XPatternSignatures
-XEmptyDataDecls
-XParallelListComp
-XForeignFunctionInterface
-XUnliftedFFITypes
-XLiberalTypeSynonyms
-XRankNTypes
-XTypeOperators
-XRecursiveDo
-XImplicitPrelude
-XGADTs
-XTypeFamilies
-XMonomorphismRestriction
-XMonoPatBinds
-XRelaxedPolyRec
-XImplicitParams
-XScopedTypeVariables
-XUnboxedTuples
-XStandaloneDeriving
-XDeriveDataTypeable
-XTypeSynonymInstances
-XFlexibleContexts
-XFlexibleInstances
-XConstrainedClassMethods
-XMultiParamTypeClasses
-XFunctionalDependencies
-XGeneralizedNewtypeDeriving
active package flags: none
packages currently loaded:
base
rts
-- :set -package ghc
active package flags:
-package ghc
packages currently loaded:
"""%{'mangling': mangling}
outtext = """\
else:
outtext = """\
-- ghci024.stdout is a generated file! please edit ghci024.py instead.
options currently set: none.
GHCi-specific dynamic flag settings:
-fno-print-explicit-foralls
......@@ -68,7 +167,6 @@ other dynamic, non-language, flag settings:
-fomit-interface-pragmas
-fdo-lambda-eta-expansion
-fno-ignore-asserts
-fno-ignore-breakpoints
-fno-do-eta-reduction
-fno-case-merge
-fno-unbox-strict-fields
......@@ -78,7 +176,10 @@ other dynamic, non-language, flag settings:
-fno-force-recomp
-fno-hpc-no-auto
-fno-rewrite-rules
%(new_flags)s -fno-vectorise
-fprint-bind-contents
-fno-run-cps
-fno-convert-to-zipper-and-back
-fno-vectorise
-fno-regs-graph
-fno-regs-iterative
-fgen-manifest
......@@ -130,7 +231,7 @@ packages currently loaded:
active package flags:
-package ghc
packages currently loaded:
"""%{'mangling': mangling, 'new_flags': new_flags}
"""%{'mangling': mangling}
outfile = open(in_testdir('ghci024.stdout'), 'w')
outfile.write(outtext)
......
putStrLn "-- ghci024.stdout is a generated file! please edit ghci024.py instead."
:set
:show languages
putStrLn "-- :set -fglasgow-exts"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment