summaryrefslogtreecommitdiff
path: root/compiler/main/DynFlags.hs
Commit message (Collapse)AuthorAgeFilesLines
...
| * Implemented feature request on reconfigurable pretty-printing in GHCi (#5461)Vitaly Bragilesky2012-06-251-4/+18
| |
| * Make -fgransim a dynamic flagIan Lynagh2012-06-201-0/+2
| |
| * Make -fparallel a dynamic flagIan Lynagh2012-06-201-0/+2
| |
| * Make -firrefutable-tuples a dynamic flagIan Lynagh2012-06-181-0/+2
| |
| * Make -ignore-dot-ghci a dynamic flagIan Lynagh2012-06-181-0/+8
| |
| * Make -dppr-cols a dynamic flagIan Lynagh2012-06-181-1/+5
| |
| * Make -dtrace-level a dynamic flagIan Lynagh2012-06-181-0/+3
| |
| * Make -dppr-case-as-let a dynamic flagIan Lynagh2012-06-141-0/+10
| |
| * Change -dppr-user-length from a static to a dynamic flagIan Lynagh2012-06-141-0/+7
| |
| * Simplify the implementation of Implicit ParametersSimon Peyton Jones2012-06-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch re-implements implicit parameters via a class with a functional dependency: class IP (n::Symbol) a | n -> a where ip :: a This definition is in the library module GHC.IP. Notice how it use a type-literal, so we can have constraints like IP "x" Int Now all the functional dependency machinery works right to make implicit parameters behave as they should. Much special-case processing for implicit parameters can be removed entirely. One particularly nice thing is not having a dedicated "original-name cache" for implicit parameters (the nsNames field of NameCache). But many other cases disappear: * BasicTypes.IPName * IPTyCon constructor in Tycon.TyCon * CIPCan constructor in TcRnTypes.Ct * IPPred constructor in Types.PredTree Implicit parameters remain special in a few ways: * Special syntax. Eg the constraint (IP "x" Int) is parsed and printed as (?x::Int). And we still have local bindings for implicit parameters, and occurrences thereof. * A implicit-parameter binding (let ?x = True in e) amounts to a local instance declaration, which we have not had before. It just generates an implication contraint (easy), but when going under it we must purge any existing bindings for ?x in the inert set. See Note [Shadowing of Implicit Parameters] in TcSimplify * TcMType.sizePred classifies implicit parameter constraints as size-0, as before the change There are accompanying patches to libraries 'base' and 'haddock' All the work was done by Iavor Diatchki
| * Follow spelling fixesIan Lynagh2012-06-131-5/+5
| |
| * Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghcIan Lynagh2012-06-131-15/+14
| |\ | | | | | | | | | | | | Fix conflicts in: compiler/main/DynFlags.hs
| | * Merge branch 'master' of http://darcs.haskell.org/ghcSimon Peyton Jones2012-06-121-15/+15
| | |\
| | | * fix spelling: "infered" -> "inferred"Simon Marlow2012-06-111-15/+15
| | | |
| | * | Revive 'mdo' expressions, per discussion in Trac #4148Simon Peyton Jones2012-06-121-5/+4
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - mdo expressions are enabled by RecursiveDo pragma - mdo expressions perform full segmentation - 'rec' groups inside 'do' are changed so they do *not* perform any segmentation. - Both 'mdo' and 'rec' are enabled by 'RecursiveDo' 'DoRec' is deprecated in favour of 'RecursiveDo' (The 'rec' keyword is also enabled by 'Arrows', as now.) Thanks to Levent for doing all the work
| * | Make tracingDynFlags slightly more definedIan Lynagh2012-06-121-2/+15
| | | | | | | | | | | | | | | In particular, fields like 'flags' are now set to the default, so at least they will work to some extent.
| * | Add DynFlags to the SDoc stateIan Lynagh2012-06-121-2/+2
| | |
| * | Pass DynFlags down to showPprIan Lynagh2012-06-121-7/+10
| | |
| * | Pass DynFlags down to hPrintDumpIan Lynagh2012-06-111-1/+1
| | |
| * | Pass DynFlags around a bit moreIan Lynagh2012-06-111-5/+5
| | |
| * | Pass DynFlags to the LogActionIan Lynagh2012-06-111-4/+9
| |/ | | | | | | | | | | | | A side-effect is that we can no longer use the LogAction in defaultErrorHandler, as we don't have DynFlags at that point. But all that defaultErrorHandler did is to print Strings as SevFatal, so now it takes a 'FatalMessager' instead.
| * Deprecate old -package-conf flags.Paolo Capriotti2012-06-081-2/+6
| |
| * Typo in commentSimon Peyton Jones2012-06-081-1/+1
| |
| * Make PolyKinds imply KindSignaturesSimon Peyton Jones2012-06-071-0/+1
| |
| * Remove more uses of stdout and stderrIan Lynagh2012-05-291-0/+12
| |
| * Replace printDump with a new SeverityIan Lynagh2012-05-291-0/+1
| | | | | | | | | | | | We now use log_action with severity SevDump, rather than calling printDump. This means that what happens to dumped info is now under the control of the GHC API user, rather than always going to stdout.
| * Add defaultLogActionHPrintDoc to DynFlagsIan Lynagh2012-05-281-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | We now use this function rather than Outputable.{printSDoc,printErrs}. Outputable is arguably a better home for the function, but putting it in DynFlags should dissuade people from using it inappropriately (in particular, nothing other than the default hooks should have stdout or stderr hardcoded). Not exporting it at all would also be an option, but exporting it with an ungainly name will make it slightly easier for people who want to send output to other Handles for some reason.
| * Accept the old -package-conf flags for backwards compatibilitySimon Marlow2012-05-221-0/+4
| |
| * Simplify the behavior of package db flags.Paolo Capriotti2012-05-151-16/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the `-no-user-package` and `-no-global-package` flags affected the "initial" stack only, while `user-package` and `global-packages` appended to the end of the stack. This commit changes the behavior of those flags, so that they are always applied to the stack as a whole. The effect of the GHC_PACKAGE_PATH environment variable has also been changed: terminating it with a separator now adds the default package dbs (user and global) instead of the initial stack.
| * Rename package-conf flags to package-db.Paolo Capriotti2012-05-151-8/+8
| | | | | | | | | | | | | | | | Rename package database flags in both GHC and ghc-pkg so that they are consistent with Cabal nomenclature. Add a version check to the build system so that the correct set of package db flags are used when the bootstrapping GHC has version < 7.5.
| * Add flags to manipulate package db stack (#5977)Paolo Capriotti2012-05-151-3/+21
| | | | | | | | | | | | | | | | Introduce new flags to allow any package database stack to be set up. The `-no-user-package-conf` and `-no-global-package-conf` flags remove the corresponding package db from the initial stack, while `-user-package-conf` and `-global-package-conf` push it back on top of the stack.
| * Add a flag for the unsupported calling convention warningIan Lynagh2012-04-241-2/+5
| |
| * Adding -ddump-avoid-vect option for vectorisation avoidance diagnosticsManuel M T Chakravarty2012-04-201-0/+2
| |
| * Add support for additional .ghci files in GHCi (#5265)Paolo Capriotti2012-04-111-1/+6
| | | | | | | | Patch by Sam Anklesaria <amsay@amsay.net>
| * Fix tracking of reason safe inference failed. (#5988)David Terei2012-04-041-10/+16
| |
| * Fix uneeded test in safe haskell codeDavid Terei2012-04-041-1/+2
| |
| * Don't document '-fregs-liveness' or '-fllvm-tbaa', both hidden flagsDavid Terei2012-03-281-6/+6
| | | | | | | | | | No reason user should turn them off, just want for ghc developer debugging uses.
| * Merge remote-tracking branch 'origin/master' into type-natsIavor S. Diatchki2012-03-241-1/+3
| |\
| | * Rename optimisation flag for uniformity with existing flags.David Terei2012-03-231-1/+1
| | |
| | * Add -favoid-vectManuel M T Chakravarty2012-03-231-0/+2
| | | | | | | | | | | | | | | | | | * Enables vectorisation avoidance (This commit only adds the flag, not the actual vectorisation avoidance transformation.)
| * | Add -XExplicitNamespaces to enable using 'type' in import/exports.Iavor S. Diatchki2012-03-241-1/+8
| |/ | | | | | | | | | | | | | | This extension is implied by: * TypeOperators: so that we can import/export things like (+) * TypeFamilies: because associated type synonyms use "type T" to name the associated type in a subordinate list.
| * GHCi: add :seti, for options that apply only at the prompt (#3217)Simon Marlow2012-03-011-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GHCi now maintains two DynFlags: one that applies to whole modules loaded with :load, and one that applies to things typed at the prompt (expressions, statements, declarations, commands). The :set command modifies both DynFlags. This is for backwards compatibility: users won't notice any difference. The :seti command applies only to the interactive DynFlags. Additionally, I made a few changes to ":set" (with no arguments): * Now it only prints out options that differ from the defaults, rather than the whole list. * There is a new variant, ":set -a" to print out all options (the old behaviour). * It also prints out language options. e.g. Prelude> :set options currently set: none. base language is: Haskell2010 with the following modifiers: -XNoDatatypeContexts -XNondecreasingIndentation GHCi-specific dynamic flag settings: other dynamic, non-language, flag settings: -fimplicit-import-qualified warning settings: ":seti" (with no arguments) does the same as ":set", but for the interactive options. It also has the "-a" option. The interactive DynFlags are kept in the InteractiveContext, and copied into the HscEnv at the appropriate points (all in HscMain). There are some new GHC API operations: -- | Set the 'DynFlags' used to evaluate interactive expressions. setInteractiveDynFlags :: GhcMonad m => DynFlags -> m () -- | Get the 'DynFlags' used to evaluate interactive expressions. getInteractiveDynFlags :: GhcMonad m => m DynFlags -- | Sets the program 'DynFlags'. setProgramDynFlags :: GhcMonad m => DynFlags -> m [PackageId] -- | Returns the program 'DynFlags'. getProgramDynFlags :: GhcMonad m => m DynFlags Note I have not completed the whole of the plan outlined in #3217 yet: when in the context of a loaded module we don't take the interactive DynFlags from that module. That needs some more refactoring and thinking about, because we'll need to save and restore the original interactive DynFlags. This solves the immediate problem that people are having with the new flag checking in 7.4.1, because now it is possible to set language options in ~/.ghci that do not affect loaded modules and thereby cause recompilation.
| * Abstract out the hFlush calls in the GHC APIIan Lynagh2012-02-241-2/+18
| | | | | | | | | | | | stdout/stderr might be closed, so we can't just hFlush them. So we instead allow configuration in the same way that log_action is configurable.
| * fix #5534 (ghci -fobject-code strangeness)Simon Marlow2012-02-161-0/+12
| |
| * Minor documentation fixSimon Hengel2012-02-141-1/+1
| | | | | | | | Add a missing 'be' to Haddock comment of `HscTarget`.
* | Merge remote-tracking branch 'origin/master' into newcgSimon Marlow2012-02-131-28/+68
|\ \ | |/ | | | | | | | | | | | | Conflicts: compiler/cmm/CmmLint.hs compiler/cmm/OldCmm.hs compiler/codeGen/CgMonad.lhs compiler/main/CodeOutput.lhs
| * Fix '-distrust-all-packages' flag.David Terei2012-02-081-1/+1
| |
| * Fix validateIan Lynagh2012-01-191-3/+9
| | | | | | | | | | | | | | | | This patch defines a flag -fno-warn-pointless-pragmas, and uses it to disable some warnings in the containers package. Along the way, also made a ContainsDynFlags class, and added a HasDynFlags instance for IOEnv (and thus TcRnIf and DsM).
| * Only use TBAA when LLVM > 2.8. (#5782)David Terei2012-01-171-8/+13
| |
| * Split -XDataKinds from -XPolyKindsJose Pedro Magalhaes2012-01-161-2/+2
| |