- Sep 20, 2017
-
-
Herbert Valerio Riedel authored
This is a preparation for `haskeline` picking up a dependency on `stm` real soon now. See https://github.com/judah/haskeline/pull/61 for details. If we figure out a way to not bundle the libraries depended upon by the GHCi executable in the global package database (see #8919 for the original reason why we had to start bundling terminfo/haskeline in the first place) we can get rid of `stm` again... On the bright side, we were able to avoid uploading new `stm` releases for over two years already, so it shouldn't cause too much trouble if GHC imposes a strong preference on the `stm` package's version (this most likely will mostly affect Linux distributions & similiar). While at it, this also update the stm submodule to include relaxed bounds to allow the upcoming base-4.11 version.
-
- Sep 19, 2017
-
-
Tao He authored
Reviewers: austin, hvr, bgamari, dfeuer Reviewed By: dfeuer Subscribers: rwbarton, thomie GHC Trac Issues: #14224 Differential Revision: https://phabricator.haskell.org/D3986
-
The function existed in integer-gmp-0.5.1.0 but was removed as part of integer-gmp2 rewrite in #9281. This is to bring it back. Test Plan: Case integerGmpInternals, with GMP 4.3.2 and GMP 6.1.2 Reviewers: austin, hvr, goldfire, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3947
-
As noted in #14226, the common block elimination pass currently implements an extremely strict equivalence relation, demanding that two blocks are equivalent including the names of their local registers. This is quite restrictive and severely hampers the effectiveness of the pass. Here we allow the CBE pass to collapse blocks which are equivalent up to alpha renaming of locally-bound local registers. This is completely safe and catches many more duplicate blocks. Test Plan: Validate Reviewers: austin, simonmar, michalt Reviewed By: michalt Subscribers: rwbarton, thomie GHC Trac Issues: #14226 Differential Revision: https://phabricator.haskell.org/D3973
-
`mkCoreApps` re-implemented `mkCoreApp` in a recursive function, rather than using a simple `foldl'` in order to avoid repeatingly computing the type of the function argument. I've factored the two logic into a new (internal) function `mkCoreType` which assumes that the type is known. `mkCoreApp` and `mkCoreApps` are thin wrappers around it. Differences - The assertion failure message of `mkCoreApps` has more information in it. - `mkCoreApps` now special-cases coercion argument like `mkCoreApp` (previously they were given to `mk_val_app` instead) Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3971
-
Some variant of this should also be added to the migration guide. [skip ci] Test Plan: Read it Reviewers: goldfire, austin Reviewed By: goldfire Subscribers: rwbarton, thomie GHC Trac Issues: #13391 Differential Revision: https://phabricator.haskell.org/D3966
-
Reviewers: bgamari, austin, hvr Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3960
-
See the added comment for details. It's "less likely" because it can still fail if the socket happens to have an FD larger than 1023, which can happen if many files are opened. Until now, basic socket programs that use `hWaitForInput` were broken on Windows. That is because on Windows `FD_SETSIZE` defaults to 64, but pretty much all GHC programs seem to have > 64 FDs open, so you can't actually create a socket on which you can `select()`. It errors with `fdReady: fd is too big` even with an example as simple as the following (in this case, on my machine the `fd` is `284`): {-# LANGUAGE OverloadedStrings #-} import Control.Monad (forever) import Network.Socket import System.IO -- Simple echo server: Reads up to 10 chars from network, echoes them back. -- Uses the Handle API so that `hWaitForInput` can be used. main :: IO () main = do sock <- socket AF_INET Stream 0 setSocketOption sock ReuseAddr 1 bind sock (SockAddrInet 1234 0x0100007f) -- 0x0100007f == 127.0.0.1 localhost listen sock 2 forever $ do (connSock, _connAddr) <- accept sock putStrLn "Got connection" h <- socketToHandle connSock ReadWriteMode hSetBuffering h NoBuffering ready <- hWaitForInput h (5 * 1000) -- 5 seconds putStrLn $ "Ready: " ++ show ready line <- hGetLine h putStrLn "Got line" hPutStrLn h ("Got: " ++ line) hClose h I'm not sure how this was not discovered earlier; for #13525 (where `fdReady()` breaking completely was also discovered late) at least it failed only when the timeout was non-zero, which is not used in ghc beyond in `hWaitForInput`, but in this Windows socket case it breaks even on the 0-timeout. Maybe there is not actually anybody who uses sockets as handles on Windows? The workaround for now is to increase `FD_SETSIZE` on Windows; increasing it is possible on Windows and BSD, see https://stackoverflow.com/questions/7976388/increasing-limit-of-fd-setsi ze-and-select A real fix would be to move to IO Completion Ports on Windows, and thus get rid of the last uses of `select()` (the other platforms already use `poll()` but Windows doesn't have that). Reviewers: bgamari, austin, hvr, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3959
-
Reviewers: bgamari, austin, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3958
-
Reviewers: bgamari, austin, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3957
-
See https://ghc.haskell.org/trac/ghc/ticket/13497#comment:17 Until now, the program import System.IO main = hWaitForInput stdin (5 * 1000) didn't wait 5 seconds for input on Winodws, it terminated immediately. This was because the `PeekNamedPipe()` function introduced in commit 94fee9e7 really only peeks, it doesn't block. So if there's no data, `fdReady(fd, msec)` would return immediately even when the given `msec` timeout is not zero. This commit fixes it by looping around `PeekNamedPipe()` with a `sleep(1 ms)`. Apparently there's no better way to do this on Windows without switching to IOCP. In any case, this change should be strictly better than what was there before. Reviewers: bgamari, austin, hvr Reviewed By: bgamari Subscribers: Phyx, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3956
-
Reviewers: bgamari, austin, hvr Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3955
-
This fixes #13497 for Windows -- at least for the `if (isSock)` part; I haven't investigated the case where it's not a socket yet. Solved by copying the new current-time based waiting logic from the non-Windows implementation above. Reviewers: bgamari, austin, hvr Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3954
-
This is done by reusing the existing cross-platform `getProcessElapsedTime()` function, which already provides nanosecond monotonic clocks, and fallback for platforms that don't have those. To do this, `getProcessElapsedTime()` had to be moved from a private RTS symbol into the public interface. Accuracy is improved in 2 ways: * Use of the monotonic clock where available * Measuring the total time spent waiting instead of a sum of intervals (between which there are small gaps) Reviewers: bgamari, austin, hvr, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3953
-
Ben Gamari authored
-
This switches the compiler/ component to get compiled with -XNoImplicitPrelude and a `import GhcPrelude` is inserted in all modules. This is motivated by the upcoming "Prelude" re-export of `Semigroup((<>))` which would cause lots of name clashes in every modulewhich imports also `Outputable` Reviewers: austin, goldfire, bgamari, alanz, simonmar Reviewed By: bgamari Subscribers: goldfire, rwbarton, thomie, mpickering, bgamari Differential Revision: https://phabricator.haskell.org/D3989
-
In general ticks are problematic for join point analysis as described in #14242. However, source notes are intended to be a best-effort annotation which shouldn't interfere with optimization. Special-case these to ensure that tail-call information is still correct, even in the presence of source note ticks. Test Plan: Validate Reviewers: simonpj, austin Reviewed By: simonpj Subscribers: rwbarton, thomie GHC Trac Issues: #14242 Differential Revision: https://phabricator.haskell.org/D3978
-
This fixes #14221, where the NCG and the DWARF code were apparently giving two different names to the same block. Test Plan: Validate with DWARF support enabled. Reviewers: simonmar, austin Subscribers: rwbarton, thomie GHC Trac Issues: #14221 Differential Revision: https://phabricator.haskell.org/D3977
-
orzo in `#ghc` reported seeing a crash due to the retainer profiler encountering a BLOCKING_QUEUE closure, which isRetainer didn't know about. I performed an audit to make sure that all of the valid closure types were listed; they weren't. This is my guess of how they should appear. Test Plan: Validate Reviewers: simonmar, austin, erikd Reviewed By: simonmar Subscribers: rwbarton, thomie GHC Trac Issues: #14235 Differential Revision: https://phabricator.haskell.org/D3967
-
Simon Peyton Jones authored
This bug was shown up by Trac #14237. It turned out to be an outright error in TcSimplify.neededEvVars, easily fixed. I improved the comments.
-
Herbert Valerio Riedel authored
This `#if 0`/`#endif` block has been around for over 10 years and it became truly redundant in 36104d7a
-
Herbert Valerio Riedel authored
This now becomes possible due to the introduction of the Semigroup=>Monoid superclass relation (see #14191). Reviewers: ekmett, RyanGlScott, austin, bgamari Reviewed By: ekmett, RyanGlScott, bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3972
-
Moritz Angermann authored
Summary: This bumps our LLVM version requirement to LLVM5, which will likely be released before GHC 8.4. Test Plan: validate Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D3797
-
- Sep 18, 2017
-
-
niteria authored
This adds a function to the RTS linker API which lets the user check the status of dynamically linked objects. It was initially proposed by @afarmer in D2068. It's useful for testing the linker and also for detecting retention problems in production. It takes a path, because it's easier to use path as key instead of producing some stable handle. It returns an enum instead of bool, because I see no reason for destroying information. All the complexity is already out in the open, so there's nothing to save the users from. Test Plan: ./validate Reviewers: simonmar, Phyx, bgamari, austin, erikd Reviewed By: Phyx, bgamari Subscribers: rwbarton, afarmer, thomie Differential Revision: https://phabricator.haskell.org/D3963
-
- Sep 17, 2017
-
-
Ben Gamari authored
-
Ben Gamari authored
-
David Feuer authored
f9c6d53f led to #14036. The problem turned out to be rather simple: the `obj` pointer was being tagged using `obj + arity`. Because this is C, that's done with *pointer arithmetic*, which is not at all what we want. Add appropriate casts. Reviewers: austin, bgamari, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14036 Differential Revision: https://phabricator.haskell.org/D3983
-
Test Plan: Validate Reviewers: hvr, RyanGlScott, austin Reviewed By: RyanGlScott Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3982
-
- Sep 16, 2017
-
-
Ben Gamari authored
Otherwise compilation fails with, libraries/base/Data/Type/Equality.hs:145:4: error: • Data constructor ‘HRefl’ constrains the choice of kind parameter: k2 ~ k2 Use TypeInType to allow this • In the definition of data constructor ‘HRefl’ In the data type declaration for ‘:~~:’ | 145 | HRefl :: a :~~: a | ^
-
- Sep 15, 2017
-
-
Arnaud Spiwack authored
Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3970
-
Prior to this, in the RenamedSource for module Renaming.RenameInExportedType ( MyType (NT) ) where data MyType = MT Int | NT The (NT) was given the location of MyType earlier on the line in the export list. Also the location was discarded for any field labels, and replaced with a `noLoc`. Test Plan: ./validate Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14189 Differential Revision: https://phabricator.haskell.org/D3968
-
Reviewers: bgamari, austin, hvr Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3952
-
Ryan Scott authored
`isIrrefutableHsPat` should always return `False` for unboxed sum patterns (`SumPat`s), since they always have at least one other corresponding pattern of the same arity (since the minimum arity for a `SumPat` is 2). Failure to do so causes incorrect code to be generated for pattern synonyms that use unboxed sums, as shown in #14228. Test Plan: make test TEST=T14228 Reviewers: austin, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie GHC Trac Issues: #14228 Differential Revision: https://phabricator.haskell.org/D3951
-
Tao He authored
Test Plan: make test TEST=T13870 Reviewers: RyanGlScott, austin, bgamari, mpickering Reviewed By: mpickering Subscribers: mpickering, rwbarton, thomie, RyanGlScott Tags: #ghc GHC Trac Issues: #13870 Differential Revision: https://phabricator.haskell.org/D3940
-
ignore all untracked changes in all submodules from the top level. This matches the older settings for the other submodules and stops litering `git status` output with files created by ./boot and make. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: hvr, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3899
-
Ben Gamari authored
[skip ci]
-
- Sep 14, 2017
-
-
Joachim Breitner authored
This will unblock perf.haskell.org, which got stuck after 8ae263ce.
-
This commit fixes several things: 1. RuntimeRep arg suppression was overeager for *visibly*-quantified RuntimeReps, which should remain. 2. The choice of whether to used a Named TyConBinder or an anonymous was sometimes wrong. Now, we do an extra little pass right before constructing the tycon to fix these. 3. TyCons that normally cannot appear unsaturated can appear unsaturated in :kind. But this fact was not propagated into the type checker. It now is.
-
test case: dependent/should_compile/T13938
-
test case: typecheck/should_fail/T13929
-