summaryrefslogtreecommitdiff
path: root/compiler/main/DynFlags.hs
Commit message (Collapse)AuthorAgeFilesLines
...
* rts: add "-no-rtsopts-suggestions" optionJavran Cheng2015-05-061-0/+4
| | | | | | | | | | | | | | | | | | Depends on D767 Setting this flag prevents RTS from giving RTS suggestions like "Use `+RTS -Ksize -RTS' to increase it." According to the comment @rwbarton made in #9579, sometimes "+RTS" suggestions don't make sense (e.g. when the program is precompiled and installed through package managers), we can encourage people to distribute binaries with either "-no-rtsopts-suggestions" or "-rtsopts". Reviewed By: erikd, austin Differential Revision: https://phabricator.haskell.org/D809 GHC Trac Issues: #9579
* Tidy up treatment of FlexibleContextsSimon Peyton Jones2015-04-301-5/+0
| | | | | | | | | | | | | | | | | Previously (Trac #10351) we could get Non type-variable argument in the constraint: C [t] (Use FlexibleContexts to permit this) When checking that `f' has the inferred type f :: forall t. C [t] => t -> () which is a bit stupid: we have *inferred* a type that we immediately *reject*. This patch arranges that that the generalisation mechanism (TcSimplify.decideQuantification) doesn't pick a predicate that will be rejected by the subsequent validity check. This forced some minor refactoring, as usual.
* Stub out pkgState with non-error, helps with debugging.Edward Z. Yang2015-04-171-2/+3
| | | | | | | | | | | | | | | | | | | | Summary: When we use -dppr-debug, we'll sometimes attempt to hit the pkgState to give more detailed information. It's pretty annoying to have this fail because we haven't filled in the pkgState: we can still get useful debugging information by printing the raw package key. To avoid this, we just put in some empty stub pkgState, to be filled in later. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D817
* Implement -f[no-]print-unicode-syntax flag for unicode syntax output (#8959)Bertram Felgenhauer2015-04-141-1/+4
| | | | | | | | | | | | | | There is currently no way to separate whether UnicodeSyntax is accepted for input from the corresponding output syntax using unicode symbols. This patch implements a separate flag for affecting ghc(i)'s output. Signed-off-by: Bertram Felgenhauer <int-e@gmx.de> Reviewed By: nomeata, austin Differential Revision: https://phabricator.haskell.org/D807 GHC Trac Issues: #8959
* use projectVersion from DynFlags rather than cProjectVersion for versionedAppDirLuite Stegeman2015-04-141-1/+1
| | | | | | | | Reviewed By: edsko, austin Differential Revision: https://phabricator.haskell.org/D824 GHC Trac Issues: #10232
* Axe one-shot sig-ofEdward Z. Yang2015-04-071-13/+5
| | | | | | | | | | | | | | | | | Summary: We're getting rid of -sig-of foo:A usage, because it doesn't make sense in any compilation mode besides one-shot, and we don't expect users to use it anyway. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D789
* Refactor the story around switches (#10137)Joachim Breitner2015-03-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This re-implements the code generation for case expressions at the Stg → Cmm level, both for data type cases as well as for integral literal cases. (Cases on float are still treated as before). The goal is to allow for fancier strategies in implementing them, for a cleaner separation of the strategy from the gritty details of Cmm, and to run this later than the Common Block Optimization, allowing for one way to attack #10124. The new module CmmSwitch contains a number of notes explaining this changes. For example, it creates larger consecutive jump tables than the previous code, if possible. nofib shows little significant overall improvement of runtime. The rather large wobbling comes from changes in the code block order (see #8082, not much we can do about it). But the decrease in code size alone makes this worthwhile. ``` Program Size Allocs Runtime Elapsed TotalMem Min -1.8% 0.0% -6.1% -6.1% -2.9% Max -0.7% +0.0% +5.6% +5.7% +7.8% Geometric Mean -1.4% -0.0% -0.3% -0.3% +0.0% ``` Compilation time increases slightly: ``` -1 s.d. ----- -2.0% +1 s.d. ----- +2.5% Average ----- +0.3% ``` The test case T783 regresses a lot, but it is the only one exhibiting any regression. The cause is the changed order of branches in an if-then-else tree, which makes the hoople data flow analysis traverse the blocks in a suboptimal order. Reverting that gets rid of this regression, but has a consistent, if only very small (+0.2%), negative effect on runtime. So I conclude that this test is an extreme outlier and no reason to change the code. Differential Revision: https://phabricator.haskell.org/D720
* Delete DynFlag for NDP wayThomas Miedema2015-03-241-13/+0
| | | | | | | | | | | | The last trace of NDP was removed in 2008 in commit: 44ee866e5bc20fcdf29ab13ea050816da9faf915 NDP stood for 'Nested Data Parallelism'. It was superseded by Data Parallel Haskell (DPH). Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D752
* Do proper depth checking in the flattener to avoid looping.Richard Eisenberg2015-03-231-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements (roughly) the plan put forward in comment:14:ticket:7788, fixing #7788, #8550, #9554, #10139, and addressing concerns raised in #10079. There are some regressions w.r.t. GHC 7.8, but only with pathological type families (like F a = F a). This also (hopefully -- don't have a test case) fixes #10158. Unsolved problems include #10184 and #10185, which are both known deficiencies of the approach used here. As part of this change, the plumbing around detecting infinite loops has changed. Instead of -fcontext-stack and -ftype-function-depth, we now have one combined -freduction-depth parameter. Setting it to 0 disbales the check, which is now the recommended way to get (terminating) code to typecheck in releases. (The number of reduction steps may well change between minor GHC releases!) This commit also introduces a new IntWithInf type in BasicTypes that represents an integer+infinity. This type is used in a few places throughout the code. Tests in indexed-types/should_fail/T7788 indexed-types/should_fail/T8550 indexed-types/should_fail/T9554 indexed-types/should_compile/T10079 indexed-types/should_compile/T10139 typecheck/should_compile/T10184 (expected broken) typecheck/should_compile/T10185 (expected broken) This commit also changes performance testsuite numbers, for the better.
* Remove comments and flag for GranSimThomas Miedema2015-03-191-12/+0
| | | | | | | | | The GranSim code was removed in dd56e9ab and 297b05a9 in 2009, and perhaps other commits I couldn't find. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D737
* Dont call unsafeGlobalDynFlags if it is not setThomas Miedema2015-03-161-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Parsing of static and mode flags happens before any session is started, i.e., before the first call to 'GHC.withGhc'. Therefore, to report errors for invalid usage of these two types of flags, we can not call any function that needs DynFlags, as there are no DynFlags available yet (unsafeGlobalDynFlags is not set either). So we always print "on the commandline" as the location, which is true except for Api users, which is probably ok. When reporting errors for invalid usage of dynamic flags we /can/ make use of DynFlags, and we do so explicitly in DynFlags.parseDynamicFlagsFull. Before, we called unsafeGlobalDynFlags when an invalid (combination of) flag(s) was given on the commandline, resulting in panics (#9963). This regression was introduced in 1d6124de. Also rename showSDocSimple to showSDocUnsafe, to hopefully prevent this from happening again. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D730 GHC Trac Issues: #9963
* Documentation for PackageArg/ModRenaming/PackageFlagEdward Z. Yang2015-03-101-11/+31
| | | | | | | | | | | | | | | Summary: [skip-ci] Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D723
* Store renamings as (ModuleName, ModuleName) pairs.Edward Z. Yang2015-03-071-7/+8
| | | | | | | | | | | | Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin, simonpj Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D710
* Custom `Typeable` solver, that keeps track of kinds.Iavor S. Diatchki2015-03-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This implements the new `Typeable` solver: when GHC sees `Typeable` constraints it solves them on the spot. The current implementation creates `TyCon` representations on the spot. Pro: No overhead at all in code that does not use `Typeable` Cons: Code that uses `Typeable` may create multipe `TyCon` represntations. We have discussed an implementation where representations of `TyCons` are computed once, in the module, where a datatype is declared. This would lead to more code being generated: for a promotable datatype we need to generate `2 + number_of_data_cons` type-constructro representations, and we have to do that for all programs, even ones that do not intend to use typeable. I added code to emit warning whenevar `deriving Typeable` is encountered--- the idea being that this is not needed anymore, and shold be fixed. Also, we allow `instance Typeable T` in .hs-boot files, but they result in a warning, and are ignored. This last one was to avoid breaking exisitng code, and should become an error, eventually. Test Plan: 1. GHC can compile itself. 2. I compiled a number of large libraries, including `lens`. - I had to make some small changes: `unordered-containers` uses internals of `TypeReps`, so I had to do a 1 line fix - `lens` needed one instance changed, due to a poly-kinded `Typeble` instance 3. I also run some code that uses `syb` to traverse a largish datastrucutre. I didn't notice any signifiant performance difference between the 7.8.3 version, and this implementation. Reviewers: simonpj, simonmar, austin, hvr Reviewed By: austin, hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D652 GHC Trac Issues: #9858
* Remove unused/undocumented flag `-fhpc-no-auto`Thomas Miedema2015-03-041-2/+0
| | | | | | | | | Added in 53a5d0b01. Perhaps accidentally? It didn't do anything back then either. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D700
* A raft of small changes associated with -XConstrainedClassMethodsSimon Peyton Jones2015-03-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | See Trac #7854. Specifically: * Major clean up and simplification of check_op in checkValidClass; specifically - use checkValidType on the entire method-selector type to detect ambiguity - put a specific test for -XConstrainedClassMethods * Make -XConstrainedClassMethods be implied by -XMultiParamTypeClasses (a bit ad-hoc but see #7854), and document in the user manual. * Do the checkAmbiguity test just once in TcValidity.checkValidType, rather than repeatedly at every level. See Note [When to call checkAmbiguity] * Add -XAllowAmbiguousTypes in GHC.IP, since 'ip' really is ambiguous. (It's a rather magic function.) * Improve location info for check_op in checkValidClass * Update quite a few tests, which had genuinely-ambiguous class method signatures. Some I fixed by making them unambiguous; some by adding -XAllowAmbiguousTypes
* driver: split -fwarn-unused-binds into 3 flags (fixes #17)Oleg Grenrus2015-02-231-3/+24
| | | | | | | | | | | | | | | | | | | | | | Summary: New flags: -fwarn-unused-top-binds -fwarn-unused-local-binds -fwarn-unused-pattern-binds Test Plan: `tests/rename/should_compile/T17` tests Correct other tests Reviewers: austin, rwbarton Reviewed By: austin, rwbarton Subscribers: rwbarton, carter, thomie Differential Revision: https://phabricator.haskell.org/D591 GHC Trac Issues: #17
* Delete vestigial external core code (#9402)Thomas Miedema2015-02-171-3/+0
| | | | | | | | | | | | | | Test Plan: harbormaster Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D659 GHC Trac Issues: #9402
* Don't hardcode the name "ghc" in versionedAppDirEdsko de Vries2015-01-161-4/+4
| | | | | | | | | | Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D618
* Package environmentsEdsko de Vries2015-01-131-2/+116
| | | | | | | | | | | | Summary: Package environments are files with package IDs that indicate which packages should be visible; see entry in user guide for details. Reviewers: duncan, austin Reviewed By: duncan, austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D558
* add -th-file which generates a th.hs fileGreg Weber2015-01-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: see Trac #8624 similar functionality is now available with -ddump-to-file -ddump-splices However, users are already accustomed to -ddump-splices having a particular format, and this format is not completely valid code The goal of -th-file is to dump valid Haskell code Additionally, the convention of -ddump-to-file is to name the file after the flag, so the file is .dump-splices Given that the goal of the new flag is to generate valid Haskell, The extension should be .hs Additionally, -ddump-to-file effects all other dump flags Test Plan: look at the output of using the -th-file flag and compare it to the output of using -ddump-to-file and -ddump-splices I want to add test cases, but just need some pointers on getting started there Reviewers: thomie, goldfire, simonpj, austin Reviewed By: simonpj, austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D518 GHC Trac Issues: #8624
* Fix out of date comment.Edward Z. Yang2015-01-071-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Major patch to add -fwarn-redundant-constraintsSimon Peyton Jones2015-01-061-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea was promted by Trac #9939, but it was Christmas, so I did some recreational programming that went much further. The idea is to warn when a constraint in a user-supplied context is redundant. Everything is described in detail in Note [Tracking redundant constraints] in TcSimplify. Main changes: * The new ic_status field in an implication, of type ImplicStatus. It replaces ic_insol, and includes information about redundant constraints. * New function TcSimplify.setImplicationStatus sets the ic_status. * TcSigInfo has sig_report_redundant field to say whenther a redundant constraint should be reported; and similarly the FunSigCtxt constructor of UserTypeCtxt * EvBinds has a field eb_is_given, to record whether it is a given or wanted binding. Some consequential chagnes to creating an evidence binding (so that we record whether it is given or wanted). * AbsBinds field abs_ev_binds is now a *list* of TcEvBiinds; see Note [Typechecking plan for instance declarations] in TcInstDcls * Some significant changes to the type checking of instance declarations; Note [Typechecking plan for instance declarations] in TcInstDcls. * I found that TcErrors.relevantBindings was failing to zonk the origin of the constraint it was looking at, and hence failing to find some relevant bindings. Easy to fix, and orthogonal to everything else, but hard to disentangle. Some minor refactorig: * TcMType.newSimpleWanteds moves to Inst, renamed as newWanteds * TcClassDcl and TcInstDcls now have their own code for typechecking a method body, rather than sharing a single function. The shared function (ws TcClassDcl.tcInstanceMethodBody) didn't have much code and the differences were growing confusing. * Add new function TcRnMonad.pushLevelAndCaptureConstraints, and use it * Add new function Bag.catBagMaybes, and use it in TcSimplify
* Rename NamedWildcards flag to NamedWildCardsThomas Winant2014-12-231-2/+2
| | | | | | | | | | | | | | | | Summary: Mind the capital C. As there is already a flag RecordWildCards with a capital C, we should at least try to be consistent in the spelling of WildCards. Test Plan: validate Reviewers: goldfire, simonpj, austin Reviewed By: simonpj, austin Subscribers: carter, thomie Differential Revision: https://phabricator.haskell.org/D584
* trac #9744, make program name and product version configurable through ↵Luite Stegeman2014-12-201-3/+8
| | | | | | | | | | | | | | | | | | | DynFlags/Settings Summary: This allows GHC API clients to use a package database and dynamic library names that do not clash with those of the host GHC This also updates the Haddock submodule. Reviewers: hvr, austin Reviewed By: austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D496
* Debug data extraction (NCG support)Peter Wortmann2014-12-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of the Debug module is to collect all required information to generate debug information (DWARF etc.) in the back-ends. Our main data structure is the "debug block", which carries all information we have about a block of code that is going to get produced. Notes: * Debug blocks are arranged into a tree according to tick scopes. This makes it easier to reason about inheritance rules. Note however that tick scopes are not guaranteed to form a tree, which requires us to "copy" ticks to not lose them. * This is also where we decide what source location we regard as representing a code block the "best". The heuristic is basically that we want the most specific source reference that comes from the same file we are currently compiling. This seems to be the most useful choice in my experience. * We are careful to not be too lazy so we don't end up breaking streaming. Debug data will be kept alive until the end of codegen, after all. * We change native assembler dumps to happen right away for every Cmm group. This simplifies the code somewhat and is consistent with how pretty much all of GHC handles dumps with respect to streamed code. (From Phabricator D169)
* Annotation lintingPeter Wortmann2014-12-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | This adds a way by which we can make sure that the Core passes treat annotations right: We run them twice and compare the results. The main problem here is that Core equivalence is awkward: We do not want the comparison to care about the order of, say, top-level or recursive bindings. This is important even if GHC generally generates the bindings in the right order - after all, if something goes wrong we don't want linting to dump out the whole program as the offense. So instead we do some heuristic matching - first greedily match everything that's easy, then match the rest by label order. This should work as long as GHC generates the labels in roughly the same order for both pass runs. In practice it seems to work alright. We also check that IdInfos match, as this might cause hard-to-spot bugs down the line (I had at least one bug because unfolding guidance didn't match!). We especially check unfoldings up until the point where it might get us into an infinite loop. (From Phabricator D169)
* Source notes (Core support)Peter Wortmann2014-12-161-1/+9
| | | | | | | | | | | | | | | | | | | | | | This patch introduces "SourceNote" tickishs that link Core to the source code that generated it. The idea is to retain these source code links throughout code transformations so we can eventually relate object code all the way back to the original source (which we can, say, encode as DWARF information to allow debugging). We generate these SourceNotes like other tickshs in the desugaring phase. The activating command line flag is "-g", consistent with the flag other compilers use to decide DWARF generation. Keeping ticks from getting into the way of Core transformations is tricky, but doable. The changes in this patch produce identical Core in all cases I tested -- which at this point is GHC, all libraries and nofib. Also note that this pass creates *lots* of tick nodes, which we reduce somewhat by removing duplicated and overlapping source ticks. This will still cause significant Tick "clumps" - a possible future optimization could be to make Tick carry a list of Tickishs instead of one at a time. (From Phabricator D169)
* Implement -XStaticValuesFacundo Domínguez2014-12-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As proposed in [1], this extension introduces a new syntactic form `static e`, where `e :: a` can be any closed expression. The static form produces a value of type `StaticPtr a`, which works as a reference that programs can "dereference" to get the value of `e` back. References are like `Ptr`s, except that they are stable across invocations of a program. The relevant wiki pages are [2, 3], which describe the motivation/ideas and implementation plan respectively. [1] Jeff Epstein, Andrew P. Black, and Simon Peyton-Jones. Towards Haskell in the cloud. SIGPLAN Not., 46(12):118–129, September 2011. ISSN 0362-1340. [2] https://ghc.haskell.org/trac/ghc/wiki/StaticPointers [3] https://ghc.haskell.org/trac/ghc/wiki/StaticPointers/ImplementationPlan Authored-by: Facundo Domínguez <facundo.dominguez@tweag.io> Authored-by: Mathieu Boespflug <m@tweag.io> Authored-by: Alexander Vershilov <alexander.vershilov@tweag.io> Test Plan: `./validate` Reviewers: hvr, simonmar, simonpj, austin Reviewed By: simonpj, austin Subscribers: qnikst, bgamari, mboes, carter, thomie, goldfire Differential Revision: https://phabricator.haskell.org/D550 GHC Trac Issues: #7015
* msse flag handling: fix trac issue #9777Denis Redozubov2014-12-051-9/+16
| | | | | | | | | | | | | | | | | | | | | Summary: Signed-off-by: Denis Redozubov <denis.redozubov@gmail.com> SSE version handled by different dynamic flags Signed-off-by: Denis Redozubov <denis.redozubov@gmail.com> Test Plan: validate Reviewers: austin, jstolarek Reviewed By: austin, jstolarek Subscribers: kolmodin, thomie, carter Differential Revision: https://phabricator.haskell.org/D504 GHC Trac Issues: #9777
* Add -fwarn-unticked-promoted-constructors to -WallAustin Seipp2014-12-051-1/+2
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* renamer: fix trac issue #9778Carlos Tomé2014-12-051-0/+3
| | | | | | | | | | | | | | | | Summary: Added flag -fwarn-unticked-promoted-constructors Test Plan: test T9778 under tests/rename/should_compile Reviewers: jstolarek, simonpj, austin Reviewed By: jstolarek, simonpj, austin Subscribers: simonpj, goldfire, jstolarek, thomie, carter Differential Revision: https://phabricator.haskell.org/D534 GHC Trac Issues: #9778
* Shorten long lines in DynFlags, add details to ghci usage guide.Lennart Kolmodin2014-11-301-393/+501
| | | | | | | | | | | | | | | | Summary: Shorten long lines in DynFlags. Describe --show-options in ghci usage guide. Reviewers: jstolarek, austin Reviewed By: jstolarek, austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D532 GHC Trac Issues: #9259
* Implement Partial Type SignaturesThomas Winant2014-11-281-0/+7
| | | | | | | | | | | | | | | | | | | | Summary: Add support for Partial Type Signatures, i.e. holes in types, see: https://ghc.haskell.org/trac/ghc/wiki/PartialTypeSignatures This requires an update to the Haddock submodule. Test Plan: validate Reviewers: austin, goldfire, simonpj Reviewed By: simonpj Subscribers: thomie, Iceland_jack, dominique.devriese, simonmar, carter, goldfire Differential Revision: https://phabricator.haskell.org/D168 GHC Trac Issues: #9478
* Embed Git commit id into `ghc --info` outputHerbert Valerio Riedel2014-11-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Since we switched to a Git submodule based GHC Git repo, `ghc.git`'s commit id uniquely identifies the state of the GHC source-tree. So having that information embedded into the `ghc` executable provides valuable information to track accurately (especially when created by buildbots) from which source-tree-state a given `ghc` snapshot (distribution) was generated. So this commit adds a new field `"Project Git commit id"` to the `ghc --info` meta-data containing the `./configure`-time Git commit id as reported by `git rev-parse HEAD`. This field can also be queried with `ghc --print-project-git-commit-id`. For source distributions, the file `GIT_COMMIT_ID` is created (with some sanity checking to detect stale commit ids, as that would render this information rather useless) Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D528
* Add `--fwarn-trustworthy-safe` to `-Wall` again.David Terei2014-11-241-1/+2
| | | | | This redoes part of 475dd93efa which was reversed in 452d6aa95b after breaking validate on windows.
* Add -fdefer-typed-holes flag which defers hole errors to runtime.Merijn Verstraaten2014-11-211-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As proposed by Richard on Trac. This patch adds a new flag -fdefer-typed-holes and changes the semantics of the -fno-warn-typed-holes flag. To summarise, by default GHC has typed holes enabled and produces a compile error when it encounters a typed hole. When -fdefer-type-errors OR -fdefer-typed-holes is enabled, hole errors are converted to warnings and result in runtime errors when evaluated. The warning flag -fwarn-typed-holes is on by default. Without -fdefer-type-errors or -fdefer-typed-holes this flag is a no-op, since typed holes are an error under these conditions. If either of the defer flags are enabled (converting typed hole errors into warnings) the -fno-warn-typed-holes flag disables the warnings. This means compilation silently succeeds and evaluating a hole will produce a runtime error. The rationale behind allowing typed holes warnings to be silenced is that tools like Syntastic for vim highlight warnings and hole warnings may be undesirable. Signed-off-by: Merijn Verstraaten <merijn@inconsistent.nl> Test Plan: validate Reviewers: austin, simonpj, thomie Reviewed By: simonpj, thomie Subscribers: Fuuzetsu, thomie, carter Differential Revision: https://phabricator.haskell.org/D442 GHC Trac Issues: #9497 Conflicts: compiler/main/DynFlags.hs
* ghc: allow --show-options and --interactive togetherLennart Kolmodin2014-11-211-584/+634
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously 'ghc --show-options' showed all options that GHC can possibly accept. With this patch, it'll only show the options that have effect in non-interactive modes. This change also adds support for using 'ghc --interactive --show-options' which previously was disallowed. This command will show all options that have effect in the interactive mode. The CmdLineParser is updated to know about the GHC modes, and then each flag is annotated with which mode it has effect. This fixes #9259. Test Plan: Try out --show-options with --interactive on the command line. With and without --interactive should give different results. Run the test suite, mode001 has been updated to verify this new flag combination. Reviewers: austin, jstolarek Reviewed By: austin, jstolarek Subscribers: jstolarek, thomie, carter, simonmar Differential Revision: https://phabricator.haskell.org/D337 GHC Trac Issues: #9259
* Implement #5462 (deriving clause for arbitrary classes)Jose Pedro Magalhaes2014-11-201-0/+2
| | | | | | | | | | | | | | Summary: (this has been submitted on behalf on @dreixel) Reviewers: simonpj, hvr, austin Reviewed By: simonpj, austin Subscribers: goldfire, thomie, carter, dreixel Differential Revision: https://phabricator.haskell.org/D476 GHC Trac Issues: #5462
* Add flag `-fwarn-missing-exported-sigs`Eric Seidel2014-11-201-0/+2
| | | | | | | | | | | | | | | | | | | Summary: add `-fwarn-missing-exported-sigs` to only warn about missing signatures if the name is exported Test Plan: validate, see testsuite/tests/warnings/should_compile/T2526.hs Reviewers: ezyang, austin, thomie Reviewed By: austin, thomie Subscribers: ezyang, thomie, carter Differential Revision: https://phabricator.haskell.org/D482 GHC Trac Issues: #2526 Conflicts: docs/users_guide/7.10.1-notes.xml
* Support for "with" renaming syntax, and output a feature flag.Edward Z. Yang2014-11-181-10/+14
| | | | | | | | | | | | | | | | | | | Summary: - Feature flag indicates to Cabal that we support thinning and renaming as it needs. - Support -package "base with (Foo as Bar)" which brings the ordinary modules into scope, as well as adding the renamings to scope. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D485
* Partially revert 475dd93efaAustin Seipp2014-11-141-2/+1
| | | | | | | This introduces ./validate failures for Windows right now, so in the mean time let's just back this flag out as a default -Wall flag. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Add `--fwarn-trustworthy-safe` to `-Wall`David Terei2014-11-121-1/+2
| | | | | Update submodule haskell2010, haskell98, hoop, hpc and stm to fix new warnings.
* Add in `-fwarn-trustworthy-safe` flag.David Terei2014-11-121-3/+11
| | | | | This warns when a module marked as `-XTrustworthy` could have been inferred as safe instead.
* Warn for Safe Haskell when -XOverlappingInstances orDavid Terei2014-11-061-12/+31
| | | | -XIncoherentInstances turned on.
* Update User's Guide, cleanup DynFlagsJan Stolarek2014-11-061-249/+290
|
* Remove -ddump-core-pipeline flagJan Stolarek2014-11-061-2/+0
|
* Remove -ddump-simpl-phases flagJan Stolarek2014-11-061-12/+3
|
* Some refactoring around endPass and debug dumpingSimon Peyton Jones2014-11-041-12/+0
| | | | | I forget all the details, but I spent some time trying to understand the current setup, and tried to simplify it a bit
* Remove legacy support for -optdef flagsThomas Miedema2014-10-311-24/+4
| | | | | | | | | | | | | | Summary: -optdef flags were deprecated in or before 2008 Reviewers: austin Reviewed By: austin Subscribers: thomie, carter, simonmar Differential Revision: https://phabricator.haskell.org/D409 GHC Trac Issues: #2773