summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Rename shadow_fatal to reflect that it is internalwip/extended-typed-holesMatthías Páll Gissurarson2019-10-091-5/+5
|
* Make only parse expressions in _(...), and enable runningMatthías Páll Gissurarson2019-10-097-97/+165
|
* Fix CI issuesMatthías Páll Gissurarson2019-10-022-11/+7
|
* Allow arbitrary expressions in _(...)Matthías Páll Gissurarson2019-10-027-110/+164
|
* Fix alignment onlyMatthías Páll Gissurarson2019-09-261-4/+4
|
* Allow any as name of holeMatthías Páll Gissurarson2019-09-253-21/+23
|
* Add ExtendedTypedHoles to T4437Matthías Páll Gissurarson2019-09-251-0/+1
|
* Hide new features behind ExtendedTypedHoles extensionMatthías Páll Gissurarson2019-09-244-4/+16
|
* Update haddock to refer to a gitlab accessible commitMatthías Páll Gissurarson2019-09-201-0/+0
|
* Some refactoring and re-exporting for plugin useMatthías Páll Gissurarson2019-09-204-19/+21
|
* Fix parsing of _()0 vs _() 0 by lexing ')n' specificallyMatthías Páll Gissurarson2019-09-205-53/+65
|
* A small refactor and comments onlyMatthías Páll Gissurarson2019-09-194-10/+15
|
* Hole contents are now passed along to hole reporter, and splices are runMatthías Páll Gissurarson2019-09-1910-22/+120
|
* Small fixesMatthías Páll Gissurarson2019-09-191-3/+3
|
* Revert, since now `_ $(...)` was being parsed as `_$(...)`Matthías Páll Gissurarson2019-09-193-25/+30
|
* Re-use $(...) and $$(...) from template haskell parser to avoid splitMatthías Páll Gissurarson2019-09-194-37/+35
|
* Add extended infix typed holes and api annotationsMatthías Páll Gissurarson2019-09-193-21/+45
|
* Make extended holes an error in patternsMatthías Páll Gissurarson2019-09-191-2/+6
|
* Parses _(...), _$(...) and _$$(...)Matthías Páll Gissurarson2019-09-184-16/+75
|
* Fix Hadrian build with Stack (#17189)Sylvain Henry2019-09-151-7/+1
| | | | Broken by 2b37a79d61e9b3787873dc9f7458ef2bde4809b0
* Rename GHC.StgToCmm.Con -> GHC.StgToCmm.DataConBen Gamari2019-09-155-6/+6
| | | | | | | | | Incredibly, Windows disallows the manipulation of any file matching Con(\..*)?. The `GHC.StgToCmm.Con` was introduced in the renamings in 447864a9, breaking the Windows build. Work around this by renaming it to `GHC.StgToCmm.DataCon` Fixes #17187.
* Fix CONLIKE typotaylorfausak2019-09-141-1/+1
|
* Add predicates for testing if IOError is ResourceVanished.Andrew Martin2019-09-132-0/+29
| | | | | This adds isResourceVanished, resourceVanishedErrorType, and isResourceVanishedErrorType to System.IO.Error, resolving #14730.
* Remove empty NCG.hJohn Ericson2019-09-1315-27/+0
|
* gitlab: Add issue template for documentation issuesBen Gamari2019-09-131-0/+22
| | | | Fixes #17180.
* Compiler should always get fingerprinting impl from baseJohn Ericson2019-09-133-21/+1
| | | | | 07ee15915d5a0d6d1aeee137541eec6e9c153e65 started the transition, but the job was never finished.
* Address review comments [skip CI]Zubin Duggal2019-09-131-8/+26
|
* Explain how to update HieAst [skip ci]Zubin Duggal2019-09-131-0/+112
|
* Add a test to make sure we don't regress on #17140 in the futureAlp Mestanogullari2019-09-135-0/+29
|
* Windows: Fix hsc2hs non-deterministic failures.Tamar Christina2019-09-131-0/+0
|
* Fix scoping of implicit parametersSimon Peyton Jones2019-09-134-3/+33
| | | | | | | | There was an outright bug in TcInteract.solveOneFromTheOther which meant that we did not always pick the innermost implicit parameter binding, causing #17104. The fix is easy, just a rearrangement of conditional tests
* Update mailmapBen Gamari2019-09-131-2/+18
|
* Fix StandaloneDerivingNingning Xie2019-09-121-1/+1
| | | | | If I understand correctly, `deriving instance _ => Eq (Foo a)` is equivalent to `data Foo a deriving Eq`, rather than `data Foo a deriving Foo`.
* Bump Cabal submodule to 3.1Sebastian Graf2019-09-126-6/+5
| | | | | | | | ------------------------- Metric Increase: haddock.Cabal T4029 -------------------------
* Remove unused `#include`s from parser/cutils.cJohn Ericson2019-09-121-6/+0
| | | | | Looks like these have been unused since 7c665f9ce0980ee7c81a44c8f861686395637453.
* Do not throw away backpack instantiations for module lookup cacheJohn Ericson2019-09-121-1/+1
| | | | | | | | | | | | | | | Currently, there is only one home package so this probably doesn't matter. But if we support multiple home packages, they could differ only in arguments (same indef component being applied). It looks like it used to be this way before 4e8a0607140b23561248a41aeaf837224aa6315b, but that commit doesn't seem to comment on this change in the particular. (It's main purpose is creating the InstalledUnitId and recategorizing the UnitId expressions accordingly.) Trying this as a separate commit for testing purposes. I leave it to others to decide whether this is a good change on its own.
* Print the correct system memory in use with +RTS -s (#17158)Pranay Sashank2019-09-121-2/+2
| | | | | | | Use `stats.max_mem_in_use_bytes` to print the memory usage instead of `stats.max_live_bytes` which prints maximum residency. Fixes (#17158).
* Windows: make openTempFile fully atomic.Tamar Christina2019-09-112-29/+47
|
* Refactor bad coercion checking in a few placesÖmer Sinan Ağacan2019-09-114-34/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do bad coercion checking in a few places in the compiler, but they all checked it differently: - CoreToStg.coreToStgArgs: Disallowed lifted-to-unlifted, disallowed changing prim reps even when the sizes are the same. - StgCmmExpr.cgCase: Checked primRepSlot equality. This disallowed Int to Int64 coercions on 64-bit systems (and Int to Int32 on 32-bit) even though those are fine. - CoreLint: Only place where we do this right. Full rules are explained in Note [Bad unsafe coercion]. This patch implements the check explained in Note [Bad unsafe coercion] in CoreLint and uses it in CoreToStg.coreToStgArgs and StgCmmExpr.cgCase. This fixes #16952 and unblocks !1381 (which fixes #16893). This is the most conservative and correct change I came up with that fixes #16952. One remaining problem with coercion checking is that it's currently done in seemingly random places. What's special about CoreToStg.coreToStgArgs and StgCmmExpr.cgCase? My guess is that adding assertions to those places caught bugs before so we left assertions in those places. I think we should remove these assertions and do coercion checking in CoreLint and StgLint only (#17041).
* SetLevels: Fix potential panic in lvlBindBen Gamari2019-09-112-4/+14
| | | | | | 3b31a94d introduced a use of isUnliftedType which can panic in the case of levity-polymorphic types. Fix this by introducing mightBeUnliftedType which returns whether the type is *guaranteed* to be lifted.
* Remove dead `ncgDebugIsOn` and `NCG_DEBUG`John Ericson2019-09-111-8/+1
| | | | Haven't been used since 16206a6603e87e15d61c57456267c5f7ba68050e.
* Bump Hadrian's QuickCheck dependencyLuke Lau2019-09-111-1/+1
|
* testsuite: check for RTS linkerPeter Trommler2019-09-112-1/+2
| | | | Fixes #16833
* Remove COMPILING_GHCJohn Ericson2019-09-111-3/+0
| | | | | It is no longer used. I guess we are sharing fewer headers with the RTS than the comment claims. That's a relief!
* linker: Move -optl flags to end of linker invocation.Niklas Hambüchen2019-09-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, giving `-optl` linker flags to `ghc` on the command line placed them in the wrong place in the `ld` command line: They were given before all the Haskell libararies, when they should appear after. Background: Most linkers like `ld.bfd` and `ld.gold`, but not the newer LLVM `lld`, work in a way where the order of `-l` flags given matters; earlier `-lmylib1` flags are supposed to create "holes" for linker symbols that are to be filled with later `lmylib2` flags that "fill the holes" for these symbols. As discovered in https://github.com/haskell/cabal/pull/5451#issuecomment-518001240, the `-optl` flags appeared before e.g. the -lHStext-1.2.3.1 -lHSbinary-0.8.6.0 -lHScontainers-0.6.0.1 flags that GHC added at the very end. Haskell libraries typically depend on C libraries, so `-lHS*` flags will create holes for the C libraries to fill in, but that only works when those libraries' `-l` flags are given **after** the `-lHS*` flags; until now they were given before, which was wrong. This meant that Cabal's `--ld-options` flag and `ld-options` `.cabal` file field were pretty ineffective, unless you used the `--ld-option=--start-group` hack as (https://github.com/haskell/cabal/pull/5451#issuecomment-406761676) that convinces the classical linkers to not be dependent on the order of linker flags given. This commit fixes the problem by simply flipping the order, putting `-optl` flags at the end, after Haskell libraries. The code change is effectively only `args1 ++ args` -> `args ++ args1` but the commit also renames the variables for improved clarity. Simple way to test it: ghc --make Main.hs -fforce-recomp -v -optl-s on a `Main.hs` like: import qualified Data.Set as Set main = print $ Set.fromList "hello"
* Module hierarchy: StgToCmm (#13009)Sylvain Henry2019-09-1074-386/+285
| | | | | | Add StgToCmm module hierarchy. Platform modules that are used in several other places (NCG, LLVM codegen, Cmm transformations) are put into GHC.Platform.
* Replace queryCygwinTerminal with Win32's isMinTTYHandleRyan Scott2019-09-091-61/+11
| | | | | | | | | | | | `SysTools.Terminal.queryCygwinTerminal` now exists in the `Win32` library under the name `isMinTTYHandle` since `Win32-2.5.0.0`. (GHC 8.4.4 ships with `Win32-2.6.1.0`, so this is well within GHC's support window.) We can therefore get replace `queryCygwinTerminal` with `isMinTTYHandle` and delete quite a bit of code from `SysTools.Terminal` in the process. Along the way I needed to replace some uses of `#if defined x` with `#if defined(x)` to please the CI linters.
* Update FastString docstringsDaniel Gröber2019-09-091-8/+10
| | | | | | 1) FastStrings are always UTF-8 encoded now. 2) Clarify what is meant by "hashed" 3) Add mention of lazy z-enc
* Use lazyness for FastString's z-encoding memoizationDaniel Gröber2019-09-092-42/+38
| | | | | | | | | | | | | | | | | | | Having an IORef in FastString to memoize the z-encoded version is unecessary because there is this amazing thing Haskell can do natively, it's called "lazyness" :) We simply remove the UNPACK and strictness annotations from the constructor field corresponding to the z-encoding, making it lazy, and store the (pure) z-encoded string there. The only complication here is 'hasZEncoding' which allows cheking if a z-encoding was computed for a given string. Since this is only used for compiler performance statistics though it's not actually necessary to have the current per-string granularity. Instead I add a global IORef counter to the FastStringTable and use unsafePerformIO to increment the counter whenever a lazy z-encoding is forced.
* Fix GHC version guard for Int32Rep/Word32RepMoritz Kiefer2019-09-081-0/+4
| | | | | Those constructors have been added after GHC 8.8. The version guards in `binary` are correct, see https://github.com/kolmodin/binary/pull/167/files.