summaryrefslogtreecommitdiff
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
...
* Define PrelNames.allNameStrings and use it in TcHsTypeSimon Peyton Jones2014-07-152-5/+15
| | | | Refactoring only.
* White space onlySimon Peyton Jones2014-07-141-1/+1
|
* Add a clarifying comment about scoping of type variables in associated type ↵Simon Peyton Jones2014-07-141-0/+5
| | | | decls
* add support for x86_64-solaris2 platformKarel Gardas2014-07-131-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Summary: this set of patches adds support for x86_64-solaris2 platform Solaris is multi-lib platform which means it provides 32bit user-land together with 32bit and 64bit libraries. The 32bit libraries are located in <somewhere>/lib directories while 64bit libraries are located in <somewhere>/lib/64 directories. This is why GHCi required the fix since otherwise it'll attempt to load /usr/lib/libgmp.so which is 32bit library into 64bit binary process space (GHCi). This of course fails with wrong ELFCLASS32 error message. Another issue was that by default GNU C distributed with Solaris compiles into 32bit binary. We need to enforce compilation to 64bit binary by adding appropriate -m64 option. Test Plan: already built on x86_64-solaris2 Reviewers: austin Reviewed By: austin Subscribers: phaskell, simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D68
* Fix ghci tab completion of duplicate identifiers.Shachaf Ben-Kiki2014-07-131-1/+5
| | | | | | | | | | | | | | | | | | | Summary: Currently, if the same identifier is imported via multiple modules, ghci shows multiple completions for it. Use the nub of the completions instead so that it only shows up once. Signed-off-by: Shachaf Ben-Kiki <shachaf@gmail.com> Test Plan: by hand Reviewers: simonmar, austin, hvr Reviewed By: austin, hvr Subscribers: hvr, simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D58
* Typo in commentGabor Greif2014-07-131-1/+1
|
* Fix note spellingGabor Greif2014-07-121-2/+2
|
* Rectify some panic messagesGabor Greif2014-07-121-6/+6
|
* Typoes in commentsGabor Greif2014-07-121-3/+3
|
* Fix commentGabor Greif2014-07-121-1/+1
|
* Activate tab checksGabor Greif2014-07-121-6/+0
|
* M-x untabifyGabor Greif2014-07-121-111/+111
|
* Comments onlyJan Stolarek2014-07-111-1/+1
|
* Remove unused parameter in rnHsTyVarJan Stolarek2014-07-111-10/+9
|
* remove SPARC related comment in PPC code generatorPeter Trommler2014-07-101-9/+0
| | | | | | | | | | | | | | | | Summary: PowerPC does not do delay slots and there is also no requirement to put extra instructions between FP operations and branches. Test Plan: None. Comment change only. Reviewers: austin, simonmar Reviewed By: austin, simonmar Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D40
* PrelNames cleanupJan Stolarek2014-07-031-76/+72
| | | | | * Replace usage of methName with varQual, because they are identical * Minor formatting adjustments
* Mark HPC ticks labels as dynamicReid Barton2014-07-021-0/+2
| | | | | | This enables GHC's PIC machinery for accessing tickboxes of other packages correctly when building dynamic libraries. Previously GHC was doing strange and wrong things in that situation. See #9012.
* compiler/ghc.mk: restore GhcHcOpts variable handling (Trac #8787)Sergei Trofimovich2014-07-021-3/+3
| | | | | | | | | | | | | | | | | | | Summary: wiki and mk/config.mk.in suggests setting GhcHcOpts for compiler-wide haskell flags. But it does not work for a while now (broke around ca07d92837fc1e3ae9be67bb7d9e7f1b8035b00f) Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Test Plan: 'make' shows now ghc timing as it used to be Reviewers: simonmar, austin Reviewed By: austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D29
* Control CPP through settings file (#8683)Carter Tazio Schonwald2014-07-022-6/+4
| | | | | | | | | | | | | | | | Summary: Allow the CPP program and flag choices for GHC be configured via the the ghc settings file Test Plan: ran validate yesterday Reviewers: hvr, austin, mzero, simonmar Reviewed By: austin, mzero, simonmar Subscribers: mzero, simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D26
* Fixup nullary typeclasses (Trac #8993)Krzysztof Gogolewski2014-07-012-3/+8
| | | | | | | | | | | | | | Summary: Fix test broken after Trac #8993 Test Plan: validate Reviewers: austin, simonpj, hvr Reviewed By: austin, hvr Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D34
* Fix demand analyser for unboxed typesSimon Peyton Jones2014-07-012-11/+56
| | | | | | | | | This is a tricky case exposed by Trac #9254. I'm surprised it hasn't shown up before, because it's happens when you use unsafePerformIO in the right way. Anyway, fixed now. See Note [Analysing with absent demand] in Demand.lhs
* Refactor checkHiBootIface so that TcGblEnv is not necessary.Edward Z. Yang2014-07-011-13/+28
| | | | | | | | | | | | | | | | Summary: This patch is a prelude to implementation of hi-to-hi compatibility checking. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D35
* Replace thenM/thenM_ with do-notation in RnExprJan Stolarek2014-07-011-126/+104
|
* Remove extraneous debugging output (#9071)Reid Barton2014-06-301-2/+1
|
* Re-add more primops for atomic ops on byte arraysJohan Tibell2014-06-3014-40/+467
| | | | | | | | | | | | | | | | | | | | | | | This is the second attempt to add this functionality. The first attempt was reverted in 950fcae46a82569e7cd1fba1637a23b419e00ecd, due to register allocator failure on x86. Given how the register allocator currently works, we don't have enough registers on x86 to support cmpxchg using complicated addressing modes. Instead we fall back to a simpler addressing mode on x86. Adds the following primops: * atomicReadIntArray# * atomicWriteIntArray# * fetchSubIntArray# * fetchOrIntArray# * fetchXorIntArray# * fetchAndIntArray# Makes these pre-existing out-of-line primops inline: * fetchAddIntArray# * casIntArray#
* Revert "Fix obscure problem with using the system linker (#8935)"Austin Seipp2014-06-301-49/+23
| | | | | | This reverts commit 2f8b4c9330b455d4cb31c186c747a7db12a69251. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Remove dead code. Fix comment typo.Jan Stolarek2014-06-302-4/+2
|
* Eliminate `Unify.validKindShape` (#9242)Iavor S. Diatchki2014-06-291-37/+1
|
* Overlapable pragmas for individual instances (#9242)Iavor S. Diatchki2014-06-297-29/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | Programmers may provide a pragma immediately after the `instance` keyword to control the overlap/incoherence behavior for individual instances. For example: instance {-# OVERLAP #-} C a where ... I chose this notation, rather than the other two outlined in the ticket for these reasons: 1. Having the pragma after the type looks odd, I think. 2. Having the pragma after there `where` does not work for stand-alone derived instances I have implemented 3 pragams: 1. NO_OVERLAP 2. OVERLAP 3. INCOHERENT These correspond directly to the internal modes currently supported by GHC. If a pragma is specified, it will be used no matter what flags are turned on. For example, putting `NO_OVERLAP` on an instance will mark it as non-overlapping, even if `OVERLAPPIN_INSTANCES` is turned on for the module.
* Factor-out the `OverlapMode` from `OverlapFlag`.Iavor S. Diatchki2014-06-295-36/+59
| | | | | | | | This seems a bit cleaner conceptually because the overlap mode and running in safety mode are quite orthogonal. More pragmatically, it also makes it possible to use `OverlapMode` to let programmers pick the overlap mode for individual instances.
* Tyop in commentGabor Greif2014-06-291-1/+1
|
* Fix #9245 by always checking hi-boot for consistency if we find one.Edward Z. Yang2014-06-281-16/+24
| | | | | | | | | | | | | | | | | | | | | | Summary: What this fix does is reorder how we look for hi-boot files: we unconditionally check for an hi-boot file, and if we don't find one, we check the import graph to see if there was circularity. This is as opposed to the previous scheme (check for circularity, then load hi-boot file). This costs us an extra file system access every typecheck, which is not the best. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: Validate and check for compiler regressions in nofib Reviewers: simonpj, austin Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D30
* Untabify and M-x whitespace cleanupGabor Greif2014-06-281-48/+42
|
* Add -XBinaryLiterals language extension (re #9224)Herbert Valerio Riedel2014-06-273-3/+25
| | | | | | | | | | | | | | | | | | | | | | | Haskell2010 supports - base-10 (prefix-less), - base-8 (via `0[oO]`-prefix), and - base-16 (via `0[xX]`-prefix) integer literals. This commit adds syntax support for base-2 integer literals via the new `0[bB]` prefix. The use of a `0b` prefix for indicating binary literals is known from popular programming languages such as C++14, Perl, Python, Ruby, and Java. This syntax extension is disabled by default and can be enabled via the new `{-# LANGUAGE BinaryLiterals #-}` pragma and/or the new `-XBinaryLiterals` This new extensions requires to upgrade the `ExtsBitmap` type from `Word` to `Word64` as this adds a 33th flag which is not guaranteed to fit into a `Word`. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org> Differential Revision: https://phabricator.haskell.org/D22
* Comments onlyGabor Greif2014-06-272-2/+2
|
* Revert "Make -fno-write-interface to all modes of GHC, not just -fno-code."Edward Z. Yang2014-06-272-6/+6
| | | | This reverts commit 05120ecd95b2ebf9b096a95304793cd78be9506e.
* Make -fno-write-interface to all modes of GHC, not just -fno-code.Edward Z. Yang2014-06-272-6/+6
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Refactor extension-bitmap in LexerHerbert Valerio Riedel2014-06-271-196/+173
| | | | | | | | | | | | | | This introduces an Enum type `ExtBits` for the currently used 32 flags and introduces a type-synonym `ExtsBitmap` for representing a set over `ExtBits`. While at it, the current `Int` was replaced by `Word` to have the compiler catch any missed use-sites. This will make it easy to swap the `Word`-representation of `ExtsBitmap` by something different, such as e.g. a `Word64` Test Plan: successful validate Differential Revision: https://phabricator.haskell.org/D23
* In TcValidity.checkAmbiguity, skolemise kind vars that appear free in the ↵Simon Peyton Jones2014-06-271-3/+8
| | | | | | kinds of type variables This was shown up by Trac #9222.
* More allDistinctTyVars from TcDeriv to TypeSimon Peyton Jones2014-06-272-12/+11
| | | | Just a minor refactoring
* s/KnownLit/KnownSymbol/g and a typo fixGabor Greif2014-06-271-3/+3
|
* Add new flag -fwrite-interface for -fno-code.Edward Z. Yang2014-06-263-2/+10
| | | | | | | | | | | | | | | | | | | Summary: Normally, -fno-code does not generate interface files. However, if you want to use it to type check over multiple runs of GHC, you will need the interface files to check source files further down the dependency chain; -fwrite-interface does this for you. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: clean validate, and a new test-case Reviewers: simonpj Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D27
* Revert "Add more primops for atomic ops on byte arrays"Johan Tibell2014-06-2614-449/+40
| | | | | | | | This commit caused the register allocator to fail on i386. This reverts commit d8abf85f8ca176854e9d5d0b12371c4bc402aac3 and 04dd7cb3423f1940242fdfe2ea2e3b8abd68a177 (the second being a fix to the first).
* Typos in commentsGabor Greif2014-06-252-3/+3
|
* Add more primops for atomic ops on byte arraysJohan Tibell2014-06-2414-40/+449
| | | | | | | | | | | | | | | | | | | Summary: Add more primops for atomic ops on byte arrays Adds the following primops: * atomicReadIntArray# * atomicWriteIntArray# * fetchSubIntArray# * fetchOrIntArray# * fetchXorIntArray# * fetchAndIntArray# Makes these pre-existing out-of-line primops inline: * fetchAddIntArray# * casIntArray#
* Add Note [Placeholder PatSyn kinds] in TcBindsSimon Peyton Jones2014-06-242-11/+36
| | | | This is just documentation for the fix to Trac #9161
* Minor refactoring of interface to extraTyVarInfoSimon Peyton Jones2014-06-241-9/+13
|
* Fix up b84748121e777dAustin Seipp2014-06-231-1/+1
| | | | | | I forgot to amend this to my last commit. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Fix #9047Austin Seipp2014-06-233-24/+33
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Simplify package dump for -v4Edward Z. Yang2014-06-221-4/+18
| | | | | | | | | | | | | | | | | | | | Summary: Previously, on -v4 and greater, we dumped out the entire package database, including lots of metadata that GHC doesn't really care about, and is guaranteed to correspond to the equivalent in the local/global package databases on disk. So, to make this output more useful, on -v4 we instead just print package IDs, and the exposed and trusted flags (E and T, which can be tweaked at runtime). Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: successful validate Reviewers: simonpj Subscribers: simonmar, relrod Differential Revision: https://phabricator.haskell.org/D24