summaryrefslogtreecommitdiff
path: root/compiler/main/DynFlags.hs
Commit message (Collapse)AuthorAgeFilesLines
...
* Make -XTemplateHaskell an error in a stage-1 compiler (except with -M)Simon Peyton Jones2013-11-121-2/+10
| | | | Fixes Trac #8519
* Wibbles to 'Tidy up the error messages we get from TH'Simon Peyton Jones2013-11-061-1/+1
|
* Warn if you use -XTemplateHaskell in stage1Simon Peyton Jones2013-11-061-4/+4
| | | | This should really be an error, but we'll just warn for now
* Make -ddump-tc-trace imply -ddump-cs-traceSimon Peyton Jones2013-11-061-2/+2
|
* Use dynamic linking only if the GHC package is compiled with -dynamic (#8376)Simon Marlow2013-10-111-3/+19
|
* Turn -H and -Rghc-timing into dynamic flags.Austin Seipp2013-10-091-1/+37
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Delete old comments referring to newSessionAustin Seipp2013-10-011-2/+2
| | | | | | | As Herbert pointed it, it was removed a long time ago. Authored-by: Kazu Yamamoto <kazu@iij.ad.jp> Signed-off-by: Austin Seipp <austin@well-typed.com>
* Typos in commentsGabor Greif2013-10-011-1/+1
|
* Improve pretty-printing of typesunknown2013-10-011-0/+2
| | | | | | | | | | | | | | | * The main change is to suppress printing (in types) of kind for-alls kind applications The new flag -fprint-explicit-kinds prints them as before (by analogy with the existing -fprint-explicit-foralls) * I also took advantage of the fact that SDoc now has access to DynFlags, to tidy up the way in which explicit for-alls are printed. Instead of passing a boolean flag around, we now simply consult the DynFlags. Much neater. I still need to add documentation for the flag
* Add back a comment that got lostSimon Marlow2013-10-011-0/+7
|
* Globally replace "hackage.haskell.org" with "ghc.haskell.org"Simon Marlow2013-10-011-1/+1
|
* Make lazy unlifted bindings an error by default.Austin Seipp2013-09-291-2/+2
| | | | | | | | | | This was supposed to happen a long time ago, but later is better than never. This makes `-fwarn-lazy-unlifted-bindings` into a no-op (with its own warning) to be removed in GHC 7.10. This fixes #8022. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Enable -msse to be specified by itself.Geoffrey Mainland2013-09-221-0/+7
| | | | This sets the SSE "version" to 1.0.
* By default, only pass 128-bit SIMD vectors in registers on X86-64.Geoffrey Mainland2013-09-221-0/+2
| | | | | | | LLVM's GHC calling convention only allows 128-bit SIMD vectors to be passed in machine registers on X86-64. This may change in LLVM 3.4; the hidden flag -fllvm-pass-vectors-in-regs causes all SIMD vector widths to be passed in registers on both X86-64 and on X86-32.
* Add support for -mavx512* flags.Geoffrey Mainland2013-09-221-2/+30
|
* Add support for -mavx and -mavx2 flags.Geoffrey Mainland2013-09-221-2/+16
|
* Restructure compilation pipeline to allow hooksAustin Seipp2013-09-221-0/+5
| | | | | | | | | | | | | | | | This commit exposes GHC's internal compiler pipeline through a `Hooks` module in the GHC API. It currently allows you to hook: * Foreign import/exports declarations * The frontend up to type checking * The one shot compilation mode * Core compilation, and the module iface * Linking and the phases in DriverPhases.hs * Quasiquotation Authored-by: Luite Stegeman <stegeman@gmail.com> Authored-by: Edsko de Vries <edsko@well-typed.com> Signed-off-by: Austin Seipp <austin@well-typed.com>
* Add flag to control loopificationJan Stolarek2013-09-181-1/+3
| | | | | It is off by default, which is meant to be a workaround for #8275. Once #8275 is fixed we will enable this option by default.
* Rename -ddump-cmm-rewrite to -ddump-cmm-sinkJan Stolarek2013-09-131-2/+2
| | | | This makes it consistent with the corresponding -cmm-sink flag
* Implement the AMP warning (#8004)Austin Seipp2013-09-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a warning when definitions conflict with the Applicative-Monad Proposal (AMP), described in #8004. Namely, this will cause a warning iff: * You have an instance of Monad, but not Applicative * You have an instance of MonadPlus, but not Alternative * You locally defined a function named join, <*>, or pure. In GHC 7.10, these warnings will actually be enforced with superclass constraints through changes in base, so programs will fail to compile then. This warning is enabled by default. Unfortunately, not all of our upstream libraries have accepted the appropriate patches. So we temporarily fix ./validate by ignoring the AMP warning. Dan Rosén made an initial implementation of this change, and the remaining work was finished off by David Luposchainsky. I finally made some minor refactorings. Authored-by: Dan Rosén <danr@chalmers.se> Authored-by: David Luposchainsky <dluposchainsky@gmail.com> Signed-off-by: Austin Seipp <austin@well-typed.com>
* Merge branch 'ghc-parmake-gsoc' (#910)Patrick Palka2013-09-091-3/+16
|\
| * Merge remote-tracking branch 'origin/master' into ghc-parmake-gsocghc-parmake-gsocPatrick Palka2013-09-081-2/+23
| |\
| * | Have `ghc --info` report support for parallel --makePatrick Palka2013-09-061-0/+1
| | |
| * | Rename DynFlags.parUpsweepNum to parMakeCountPatrick Palka2013-08-301-4/+4
| | |
| * | Merge branch 'master' into ghc-parmake-gsocPatrick Palka2013-08-301-6/+26
| |\ \ | | | | | | | | | | | | | | | | | | | | Conflicts: compiler/main/DynFlags.hs compiler/utils/FastString.lhs
| * | | Implement the parallel upsweep (#910)Patrick Palka2013-08-261-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parallel upsweep is the parallel counterpart to the default sequential upsweep. It attempts to compile modules in parallel by subdividing the work of the upsweep into parts that can be executed concurrently by multiple Haskell threads. In order to enable the parallel upsweep, the user has to pass the -jN flag to GHC, where N is an optional number denoting the number of jobs, or modules, to compile in parallel, like with GNU make. In GHC this just sets the number of capabilities to N.
| * | | TcEnv: Make mkWrapperName deterministic and thread-safePatrick Palka2013-08-261-2/+2
| | | |
| * | | SysTools: make various functions thread-safePatrick Palka2013-08-261-1/+5
| | | |
* | | | Remove -fwarn-typeable-instancesJose Pedro Magalhaes2013-09-091-4/+1
| |_|/ |/| |
* | | resurrected -fdicts-strict, off by defaultNicolas Frisby2013-09-081-1/+7
| | | | | | | | | | | | also added -fdmd-tx-dict-sel, on by default
* | | Add basic support for GHCJSAustin Seipp2013-09-061-1/+16
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch encompasses most of the basic infrastructure for GHCJS. It includes: * A new extension, -XJavaScriptFFI * A new architecture, ArchJavaScript * Parser and lexer support for 'foreign import javascript', only available under -XJavaScriptFFI, using ArchJavaScript. * As a knock-on, there is also a new 'WayCustom' constructor in DynFlags, so clients of the GHC API can add custom 'tags' to their built files. This should be useful for other users as well. The remaining changes are really just the resulting fallout, making sure all the cases are handled appropriately for DynFlags and Platform. Authored-by: Luite Stegeman <stegeman@gmail.com> Signed-off-by: Austin Seipp <aseipp@pobox.com>
* | Export languageExtensions as part of the API.Jan Stolarek2013-08-301-6/+7
| | | | | | | | Fixes #8200
* | simplified the .hi format and added the -flate-dmd-anal flag (fixes #7782)Nicolas Frisby2013-08-291-0/+5
| | | | | | | | cf http://ghc.haskell.org/trac/ghc/wiki/LateDmd
* | Display the full type environment when reporting type holesSimon Peyton Jones2013-08-291-0/+6
| | | | | | | | | | | | | | This fixes Trac #8191. The patch also adds and documents a new flag -fmax-relevant-bindings=N which lets you control how many bindings in the type environment are shown.
* | Implement -XNumDecimals (#7266)Austin Seipp2013-08-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under -XNumDecimals, it's possible to specify an integer literal using compact "floating point" syntax for any floating literal constant which also happens to be an integer. This lets us write 1.2e6 :: Integer instead of: 1200000 :: Integer This also makes some amendments to the users guide. Authored-by: Shachaf Ben-Kiki <shachaf@gmail.com> Signed-off-by: Austin Seipp <aseipp@pobox.com>
* | Rework how iOS does linking (#8127)Austin Seipp2013-08-281-1/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | iOS has some particular constraints about how applications can be built: * We must generate a static library (.a) since XCode does the final link. * We need to carefully give the right set of arguments to libtool in the case we're generating an archive. * Dynamic linking isn't supported. * It can only be done on OS X. This patch cleans up all of the above. We add a new flag `-staticlib` (only supported on Darwin) that allows us to produce archive files using libtool, and a -pgmlibtool flag to control which 'libtool' executable to use. This fixes #8127. I believe this is the last piece missing from the iOS cross compiler. Authored-by: Luke Iannini <lukexi@me.com> Authored-by: Maxwell Swadling <maxwellswadling@gmail.com> Authored-by: Stephen Blackheath <...@blacksapphire.com> Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Implement "roles" into GHC.Richard Eisenberg2013-08-021-0/+2
| | | | | | | | | | | | | | | | Roles are a solution to the GeneralizedNewtypeDeriving type-safety problem. Roles were first described in the "Generative type abstraction" paper, by Stephanie Weirich, Dimitrios Vytiniotis, Simon PJ, and Steve Zdancewic. The implementation is a little different than that paper. For a quick primer, check out Note [Roles] in Coercion. Also see http://ghc.haskell.org/trac/ghc/wiki/Roles and http://ghc.haskell.org/trac/ghc/wiki/RolesImplementation For a more formal treatment, check out docs/core-spec/core-spec.pdf. This fixes Trac #1496, #4846, #7148.
* Add a warning for empty enumerations; fixes #7881Ian Lynagh2013-08-011-0/+3
| | | | We now give a warning about enumerations like [5 .. 3] :: Int8.
* Add NegativeLiterals extensionIan Lynagh2013-07-311-0/+2
| | | | | | | | | | | I'd been meaning to do this for some time, but finally got around to it due to the overflowing literals warning. With that enabled, we were getting a warning for -128 :: Int8 as that is parsed as negate (fromInteger 128) which just happens to do the right thing, as negate (fromInteger 128) = negate (-128) = -128
* Add a warning for overflowing literals; fixes #7895Ian Lynagh2013-07-311-0/+3
|
* Rename doDynamicToo to dynamicTooMkDynamicDynFlagsIan Lynagh2013-07-301-11/+12
| | | | | Makes it look less likely that people will confuse what it is for (e.g. #8104).
* Remove an out-of-date comment (see #8101)Ian Lynagh2013-07-281-5/+0
|
* Sync the list of default warnings with reality; fixes #8060.Ian Lynagh2013-07-211-10/+9
|
* Re-adjust whitespaceIan Lynagh2013-06-231-9/+10
|
* Allow the GHCi messages to be overridden via the GHC API; fixes #7456Ian Lynagh2013-06-231-2/+11
| | | | | | | They now go through log_action. The existing severities all used printDoc, which always adds a trailing newline, which we don't want for the GHCi messages. I therefore added a new severity SevInteractive, which doesn't add a newline.
* Detect linker information at runtime. Fixes Trac #6063Austin Seipp2013-06-161-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we did ./configure time checks to see if 'GNU ld' supported certain options. If it does, we bake those options into the link step. See Trac #5240. Unfortunately, the linker we use at runtime can change for several reasons. One is that the user specifies -pgml 'foo'. The other is if /usr/bin/ld or whatnot changes from when GHC was built. Those options mentioned earlier are specific to GNU ld, but many systems support GNU gold too. This is Trac #6063. So we need to check at runtime what linker we're using. This is actually a little bit complicated because we normally use the C compiler as our linker. Windows and OS X are also special here. Finally, this patch also unconditionally gives '--hash-size=31' and '--reduce-memory-overheads' to the system linker if it's GNU ld. These options have been supported for 8+ years from what I can see, and there are probably a lot of other reasons why GHC would not work with such an ancient binutils, all things considered. See Note [Run-time linker info] in SysTools for details. There are plenty of comments as well in the surrounding code. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Implement cardinality analysisSimon Peyton Jones2013-06-061-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This major patch implements the cardinality analysis described in our paper "Higher order cardinality analysis". It is joint work with Ilya Sergey and Dimitrios Vytiniotis. The basic is augment the absence-analysis part of the demand analyser so that it can tell when something is used never at most once some other way The "at most once" information is used a) to enable transformations, and in particular to identify one-shot lambdas b) to allow updates on thunks to be omitted. There are two new flags, mainly there so you can do performance comparisons: -fkill-absence stops GHC doing absence analysis at all -fkill-one-shot stops GHC spotting one-shot lambdas and single-entry thunks The big changes are: * The Demand type is substantially refactored. In particular the UseDmd is factored as follows data UseDmd = UCall Count UseDmd | UProd [MaybeUsed] | UHead | Used data MaybeUsed = Abs | Use Count UseDmd data Count = One | Many Notice that UCall recurses straight to UseDmd, whereas UProd goes via MaybeUsed. The "Count" embodies the "at most once" or "many" idea. * The demand analyser itself was refactored a lot * The previously ad-hoc stuff in the occurrence analyser for foldr and build goes away entirely. Before if we had build (\cn -> ...x... ) then the "\cn" was hackily made one-shot (by spotting 'build' as special. That's essential to allow x to be inlined. Now the occurrence analyser propagates info gotten from 'build's stricness signature (so build isn't special); and that strictness sig is in turn derived entirely automatically. Much nicer! * The ticky stuff is improved to count single-entry thunks separately. One shortcoming is that there is no DEBUG way to spot if an allegedly-single-entry thunk is acually entered more than once. It would not be hard to generate a bit of code to check for this, and it would be reassuring. But it's fiddly and I have not done it. Despite all this fuss, the performance numbers are rather under-whelming. See the paper for more discussion. nucleic2 -0.8% -10.9% 0.10 0.10 +0.0% sphere -0.7% -1.5% 0.08 0.08 +0.0% -------------------------------------------------------------------------------- Min -4.7% -10.9% -9.3% -9.3% -50.0% Max -0.4% +0.5% +2.2% +2.3% +7.4% Geometric Mean -0.8% -0.2% -1.3% -1.3% -1.8% I don't quite know how much credence to place in the runtime changes, but movement seems generally in the right direction.
* Don't try to use -dynamic-too on WindowsIan Lynagh2013-05-251-1/+6
| | | | It doesn't work
* Handle -opt<blah> options more consistently (#7909)Simon Marlow2013-05-211-2/+5
| | | | | Now these are always added by the run<blah> functions in SysTools, so we never miss any out. Several cleanups resulted.
* Link to the right RTS whenever we build a .dll on WindowsIan Lynagh2013-05-151-1/+1
| | | | | When GHCi makes temporary DLLs, those also need to be linked against the right RTS, or we won't be able to load them.