| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: hvr, bgamari, Azel
Reviewed By: bgamari
Subscribers: thomie, Azel, rwbarton, carter
GHC Trac Issues: #5518, #15525
Differential Revision: https://phabricator.haskell.org/D5066
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trac #15349 reveals that lazy blackholing can cause trouble for
`fixST` much like it can for `fixIO`. Make `fixST` work just
like `fixIO`.
Reviewers: simonmar, hvr, bgamari
Reviewed By: simonmar
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #15349
Differential Revision: https://phabricator.haskell.org/D4948
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate
Reviewers: hvr
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #15062
Differential Revision: https://phabricator.haskell.org/D4854
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Implement the "Embrace Type :: Type" GHC proposal,
.../ghc-proposals/blob/master/proposals/0020-no-type-in-type.rst
GHC 8.0 included a major change to GHC's type system: the Type :: Type
axiom. Though casual users were protected from this by hiding its
features behind the -XTypeInType extension, all programs written in GHC
8+ have the axiom behind the scenes. In order to preserve backward
compatibility, various legacy features were left unchanged. For example,
with -XDataKinds but not -XTypeInType, GADTs could not be used in types.
Now these restrictions are lifted and -XTypeInType becomes a redundant
flag that will be eventually deprecated.
* Incorporate the features currently in -XTypeInType into the
-XPolyKinds and -XDataKinds extensions.
* Introduce a new extension -XStarIsType to control how to parse * in
code and whether to print it in error messages.
Test Plan: Validate
Reviewers: goldfire, hvr, bgamari, alanz, simonpj
Reviewed By: goldfire, simonpj
Subscribers: rwbarton, thomie, mpickering, carter
GHC Trac Issues: #15195
Differential Revision: https://phabricator.haskell.org/D4748
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test num009 fails different results. #15062 lists more issues on other
platforms. Test T14894 fails because DWARF support is not implemented in
the PowerPC native code backend. T5435_v_asm_b fails because the runtime
linker is not implemented for PowerPC 64-bit systems.
Test Plan: validate
Reviewers: bgamari, hvr, erikd, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #13634, #11261, #11259, #15062
Differential Revision: https://phabricator.haskell.org/D4825
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we would allow the expiration time to overflow, which in
practice meant that `threadDelay maxBound` we return far earlier than
circa 2500 CE. For now we fix this by simply clamping to maxBound.
Fixes #15158.
Test Plan: Validate, run T8089
Reviewers: simonmar, hvr
Reviewed By: simonmar
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #15158
Differential Revision: https://phabricator.haskell.org/D4719
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Another round and attempt at getting these down to 0.
We really should re-enable the CI and not wait for those cloud based ones.
I've disabled the backpack tests on windows as they are too broad, they test
as much the shell as they do the compiler.
The perf tests have been too long to track down. but the numbers are horrible
but I don't see them getting fixed so just have to accept them.
T9293 has new windows specific output because a Dyn way only flag was added.
This will of course not work on non-Dyn way builds.
Test Plan: ./validate
Reviewers: bgamari, hvr, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #15107
Differential Revision: https://phabricator.haskell.org/D4668
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This finally gets us to a green ./validate --slow on linux for a ghc
checkout from the beginning of this week, see
https://circleci.com/gh/ghc/ghc/4739
This is hopefully the final (or second to final) patch to
address #14890.
Test Plan: ./validate --slow
Reviewers: bgamari, hvr, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #14890
Differential Revision: https://phabricator.haskell.org/D4712
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #15081.
Test Plan: cd libraries/base && make test TEST="enumNumeric"
Reviewers: hvr, bgamari
Reviewed By: bgamari
Subscribers: dfeuer, simonpj, thomie, carter
GHC Trac Issues: #15081
Differential Revision: https://phabricator.haskell.org/D4650
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ignore any errors thrown by finalizers when running them.
This prevents a faulty finalizer from stopping the rest being called.
Test Plan: ./validate, new test T13167
Reviewers: hvr, bgamari, simonmar
Reviewed By: bgamari, simonmar
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #13167
Differential Revision: https://phabricator.haskell.org/D4693
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously `showEFloat (Just 0) pi ""` would produce `3.0e0`. Of
course, this
blatantly disrespects the user's request to print with zero digits of
precision.
Fix this.
This is tested by base's `num008` testcase.
Test Plan: Validate
Reviewers: hvr
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #15115
Differential Revision: https://phabricator.haskell.org/D4665
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GHC and the build tools use "response files" to work around the limit
on the length of command line arguments on Windows. Haddock's
implementation of parsing response files (i.e escaping/unescaping the
appropriate characters) seems complete, is well tested, and also
closely matches the GCC version. This patch moves the relevant bits
into `base` so that it's easier for other libraries to reuse it.
Test Plan: make test TEST=T13896
Reviewers: bgamari, RyanGlScott, 23Skidoo, hvr
Reviewed By: RyanGlScott
Subscribers: thomie, carter
GHC Trac Issues: #13896
Differential Revision: https://phabricator.haskell.org/D4612
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expects the current behavior, will be updated by D4593 to reflect
desired behavior.
Reviewers: hvr
Subscribers: thomie, carter
GHC Trac Issues: #10412
Differential Revision: https://phabricator.haskell.org/D4610
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Requires bumping several submodules.
Test Plan: ./validate
Reviewers: hvr, bgamari
Subscribers: thomie, carter
GHC Trac Issues: #15042
Differential Revision: https://phabricator.haskell.org/D4604
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: hvr, alpmestan
Reviewed By: alpmestan
Subscribers: thomie, carter
GHC Trac Issues: #10010
Differential Revision: https://phabricator.haskell.org/D4543
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the testsuite pass clean on Windows again.
It also fixes the `libstdc++-6.dll` error harbormaster
was showing.
I'm marking some tests as isolated tests to reduce their
flakiness (mostly concurrency tests) when the test system
is under heavy load.
Updates process submodule.
Test Plan: ./validate
Reviewers: hvr, bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4277
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate
Reviewers: hvr
Subscribers: rwbarton, thomie
GHC Trac Issues: #14425
Differential Revision: https://phabricator.haskell.org/D4167
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate
Reviewers: hvr
Subscribers: rwbarton, thomie
GHC Trac Issues: #14425
Differential Revision: https://phabricator.haskell.org/D4166
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This removes the part of the test that checks whether the timeout happened in
a 'reasonable' amount of time, because it is flaky.
In subsequent work, we can turn this into a benchmark.
Test Plan: This _is_ a test
Reviewers: nh2, bgamari, Phyx, austin, hvr
Reviewed By: Phyx
Subscribers: rwbarton, thomie
GHC Trac Issues: #8684
Differential Revision: https://phabricator.haskell.org/D4120
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first in a series of regression tests prompted by
https://ghc.haskell.org/trac/ghc/ticket/8684 and D4011, D4012, D4041
Test Plan: This _is_ a test.
Reviewers: nh2, austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #8684
Differential Revision: https://phabricator.haskell.org/D4074
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This closes the nearly-eight-year-old #3474.
Test Plan: Validate
Reviewers: RyanGlScott, austin, hvr
Subscribers: rwbarton, thomie
GHC Trac Issues: #3474
Differential Revision: https://phabricator.haskell.org/D3870
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The `Read` instance for `Proxy`, as well as a handful of other data
types in `base` which only have a single constructor, are doing something
skeevy: they're requiring that they be surrounded by parentheses if the parsing
precedence is sufficiently high. This means that `"Thing (Proxy)"` would parse,
but not `"Thing Proxy"`. But the latter really ought to parse, since there's no
need to surround a single constructor with parentheses. Indeed, that's the
output of `show (Thing Proxy)`, so the current `Read` instance for `Proxy`
violates `read . show = id`.
The simple solution is to change `readParen (d > 10)` to `readParen False` in
the `Read` instance for `Proxy`. But given that a derived `Read` instance would
essentially accomplish the same thing, but with even fewer characters, I've
opted to just replace the hand-rolled `Read` instance with a derived one.
Test Plan: make test TEST=T12874
Reviewers: ekmett, austin, hvr, goldfire, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #12874
Differential Revision: https://phabricator.haskell.org/D3871
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: ./validate on harbormaster
Reviewers: austin, hvr, bgamari, erikd, Phyx
Reviewed By: Phyx
Subscribers: Phyx, rwbarton, thomie
GHC Trac Issues: #12494
Differential Revision: https://phabricator.haskell.org/D3726
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was proposed by David Feuer
(https://mail.haskell.org/pipermail/libraries/2016-August/027293.html)
and solves #14029.
The implementation is a copy of the '<&>' operator in Control.Lens.Lens.
Add tests for following Data.Functor operators: '<$>', '<&>', '<$' and '$>'.
'<&>' was added for solving #14029. '<$>', '<$' and '$>' were probably
untested.
Reviewers: austin, hvr, bgamari, RyanGlScott
Reviewed By: RyanGlScott
Subscribers: RyanGlScott, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3800
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, dfeuer
Subscribers: dfeuer, rwbarton, thomie
GHC Trac Issues: #13629
Differential Revision: https://phabricator.haskell.org/D3508
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Namely `Num`, `Functor`, `Applicative`, `Monad`, `Semigroup` and
`Monoid` for `Data.Ord.Down` (#13097).
Reviewers: austin, hvr, bgamari, RyanGlScott
Reviewed By: bgamari, RyanGlScott
Subscribers: RyanGlScott, rwbarton, thomie
GHC Trac Issues: #13097
Differential Revision: https://phabricator.haskell.org/D3500
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was previously broken (#13252) by
f46369b8a1bf90a3bdc30f2b566c3a7e03672518, which ported the fdReady
function from `select` to `poll` and in so doing dropping support for
timeouts. Unfortunately, while `select` tells us the amount of time not
slept (on Linux anyways; it turns out this is implementation dependent),
`poll` does not give us this luxury. Consequently, we manually need to
track time slept in this case.
Unfortunately, portably measuring time is hard. Ideally we would use
`clock_gettime` with the monotonic clock here, but sadly this isn't
supported on most versions of Darwin. Consequently, we instead use
`gettimeofday`, running the risk of system time changes messing us up.
Test Plan: Validate
Reviewers: simonmar, austin, hvr
Reviewed By: simonmar
Subscribers: rwbarton, thomie
GHC Trac Issues: #13252
Differential Revision: https://phabricator.haskell.org/D3473
|
|
|
|
|
|
| |
x87's transcendental instructions are terribly imprecise and fail this test.
Moreover, we really ouch to enable -mse2 on i386 by default as it is nearly
universally supported at this point. See #13540.
|
|
|
|
|
|
|
|
| |
Reviewers: austin, hvr
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3420
|
|
|
|
|
|
|
|
| |
Reviewers: austin, hvr
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3419
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The script I used is included as testsuite/driver/kill_extra_files.py,
though at this point it is for mostly historical interest.
Some of the tests in libraries/hpc relied on extra_files.py, so this
commit includes an update to that submodule.
One test in libraries/process also relies on extra_files.py, but we
cannot update that submodule so easily, so for now we special-case it
in the test driver.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This at long last realizes the ideas for type-indexed Typeable discussed in A
Reflection on Types (#11011). The general sketch of the project is described on
the Wiki (Typeable/BenGamari). The general idea is that we are adding a type
index to `TypeRep`,
data TypeRep (a :: k)
This index allows the typechecker to reason about the type represented by the `TypeRep`.
This index representation mechanism is exposed as `Type.Reflection`, which also provides
a number of patterns for inspecting `TypeRep`s,
```lang=haskell
pattern TRFun :: forall k (fun :: k). ()
=> forall (r1 :: RuntimeRep) (r2 :: RuntimeRep)
(arg :: TYPE r1) (res :: TYPE r2).
(k ~ Type, fun ~~ (arg -> res))
=> TypeRep arg
-> TypeRep res
-> TypeRep fun
pattern TRApp :: forall k2 (t :: k2). ()
=> forall k1 (a :: k1 -> k2) (b :: k1). (t ~ a b)
=> TypeRep a -> TypeRep b -> TypeRep t
-- | Pattern match on a type constructor.
pattern TRCon :: forall k (a :: k). TyCon -> TypeRep a
-- | Pattern match on a type constructor including its instantiated kind
-- variables.
pattern TRCon' :: forall k (a :: k). TyCon -> [SomeTypeRep] -> TypeRep a
```
In addition, we give the user access to the kind of a `TypeRep` (#10343),
typeRepKind :: TypeRep (a :: k) -> TypeRep k
Moreover, all of this plays nicely with 8.2's levity polymorphism, including the
newly levity polymorphic (->) type constructor.
Library changes
---------------
The primary change here is the introduction of a Type.Reflection module to base.
This module provides access to the new type-indexed TypeRep introduced in this
patch. We also continue to provide the unindexed Data.Typeable interface, which
is simply a type synonym for the existentially quantified SomeTypeRep,
data SomeTypeRep where SomeTypeRep :: TypeRep a -> SomeTypeRep
Naturally, this change also touched Data.Dynamic, which can now export the
Dynamic data constructor. Moreover, I removed a blanket reexport of
Data.Typeable from Data.Dynamic (which itself doesn't even import Data.Typeable
now).
We also add a kind heterogeneous type equality type, (:~~:), to
Data.Type.Equality.
Implementation
--------------
The implementation strategy is described in Note [Grand plan for Typeable] in
TcTypeable. None of it was difficult, but it did exercise a number of parts of
the new levity polymorphism story which had not yet been exercised, which took
some sorting out.
The rough idea is that we augment the TyCon produced for each type constructor
with information about the constructor's kind (which we call a KindRep). This
allows us to reconstruct the monomorphic result kind of an particular
instantiation of a type constructor given its kind arguments.
Unfortunately all of this takes a fair amount of work to generate and send
through the compilation pipeline. In particular, the KindReps can unfortunately
get quite large. Moreover, the simplifier will float out various pieces of them,
resulting in numerous top-level bindings. Consequently we mark the KindRep
bindings as noinline, ensuring that the float-outs don't make it into the
interface file. This is important since there is generally little benefit to
inlining KindReps and they would otherwise strongly affect compiler performance.
Performance
-----------
Initially I was hoping to also clear up the remaining holes in Typeable's
coverage by adding support for both unboxed tuples (#12409) and unboxed sums
(#13276). While the former was fairly straightforward, the latter ended up being
quite difficult: while the implementation can support them easily, enabling this
support causes thousands of Typeable bindings to be emitted to the GHC.Types as
each arity-N sum tycon brings with it N promoted datacons, each of which has a
KindRep whose size which itself scales with N. Doing this was simply too
expensive to be practical; consequently I've disabled support for the time
being.
Even after disabling sums this change regresses compiler performance far more
than I would like. In particular there are several testcases in the testsuite
which consist mostly of types which regress by over 30% in compiler allocations.
These include (considering the "bytes allocated" metric),
* T1969: +10%
* T10858: +23%
* T3294: +19%
* T5631: +41%
* T6048: +23%
* T9675: +20%
* T9872a: +5.2%
* T9872d: +12%
* T9233: +10%
* T10370: +34%
* T12425: +30%
* T12234: +16%
* 13035: +17%
* T4029: +6.1%
I've spent quite some time chasing down the source of this regression and while
I was able to make som improvements, I think this approach of generating
Typeable bindings at time of type definition is doomed to give us unnecessarily
large compile-time overhead.
In the future I think we should consider moving some of all of the Typeable
binding generation logic back to the solver (where it was prior to
91c6b1f54aea658b0056caec45655475897f1972). I've opened #13261 documenting this
proposal.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is generalizes the kind of `(->)`, as discussed in #11714.
This involves a few things,
* Generalizing the kind of `funTyCon`, adding two new `RuntimeRep`
binders,
```lang=haskell
(->) :: forall (r1 :: RuntimeRep) (r2 :: RuntimeRep)
(a :: TYPE r1) (b :: TYPE r2).
a -> b -> *
```
* Unsaturated applications of `(->)` are expressed as explicit
`TyConApp`s
* Saturated applications of `(->)` are expressed as `FunTy` as they are
currently
* Saturated applications of `(->)` are expressed by a new `FunCo`
constructor in coercions
* `splitTyConApp` needs to ensure that `FunTy`s are split to a
`TyConApp`
of `(->)` with the appropriate `RuntimeRep` arguments
* Teach CoreLint to check that all saturated applications of `(->)` are
represented with `FunTy`
At the moment I assume that `Constraint ~ *`, which is an annoying
source of complexity. This will
be simplified once D3023 is resolved.
Also, this introduces two known regressions,
`tcfail181`, `T10403`
=====================
Only shows the instance,
instance Monad ((->) r) -- Defined in ‘GHC.Base’
in its error message when -fprint-potential-instances is used. This is
because its instance head now mentions 'LiftedRep which is not in scope.
I'm not entirely sure of the right way to fix this so I'm just accepting
the new output for now.
T5963 (Typeable)
================
T5963 is now broken since Data.Typeable.Internals.mkFunTy computes its
fingerprint without the RuntimeRep variables that (->) expects. This
will be fixed with the merge of D2010.
Haddock performance
===================
The `haddock.base` and `haddock.Cabal` tests regress in allocations by
about 20%. This certainly hurts, but it's also not entirely unexpected:
the size of every function type grows with this patch and Haddock has a
lot of functions in its heap.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Make `liftA2` a method of `Applicative`.
* Add explicit `liftA2` definitions to instances in `base`.
* Add explicit invocations in `base`.
Reviewers: ekmett, bgamari, RyanGlScott, austin, hvr
Reviewed By: RyanGlScott
Subscribers: ekmett, RyanGlScott, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3031
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use `noDuplicate#` to prevent lazy `ST` thunks from
being evaluated in multiple GHC threads.
Some lazy `ST` functions added laziness that did not seem to be useful
(e.g.,
creating lazy pairs that will never be matched unless one of their
components
is demanded). Stripped that out.
Reviewers: ekmett, simonpj, bgamari, simonmar, austin, hvr
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3038
GHC Trac Issues: #11760
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. DoParamM requires the FlexibleContexts pragma now.
2. topHandler02 and topHandler03 were broken as timeout.py failed to
translate signals to exit codes.
3. topHandler03 does not produce a consistent stderr, as it depends on
what the user has /bin/sh set to. dash writes "Terminated" whereas
bash and zsh produce nothing in non-interactive mode.
4. The remaining tests are broken due to changes in the error message
formatting.
Test Plan: validate
Reviewers: thomie, dfeuer, austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: Phyx, dfeuer
Differential Revision: https://phabricator.haskell.org/D2807
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `clean_cmd` and `extra_clean` setup functions don't do anything.
Remove them from .T files.
Created using https://github.com/thomie/refactor-ghc-testsuite. This
diff is a test for the .T-file parser/processor/pretty-printer in that
repository.
find . -name '*.T' -exec ~/refactor-ghc-testsuite/Main "{}" \;
Tests containing inline comments or multiline strings are not modified.
Preparation for #12223.
Test Plan: Harbormaster
Reviewers: austin, hvr, simonmar, mpickering, bgamari
Reviewed By: mpickering
Subscribers: mpickering
Differential Revision: https://phabricator.haskell.org/D3000
GHC Trac Issues: #12223
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit implements the proposal in
https://github.com/ghc-proposals/ghc-proposals/pull/29 and
https://github.com/ghc-proposals/ghc-proposals/pull/35.
Here are some of the pieces of that proposal:
* Some of RuntimeRep's constructors have been shortened.
* TupleRep and SumRep are now parameterized over a list of RuntimeReps.
* This
means that two types with the same kind surely have the same
representation.
Previously, all unboxed tuples had the same kind, and thus the fact
above was
false.
* RepType.typePrimRep and friends now return a *list* of PrimReps. These
functions can now work successfully on unboxed tuples. This change is
necessary because we allow abstraction over unboxed tuple types and so
cannot
always handle unboxed tuples specially as we did before.
* We sometimes have to create an Id from a PrimRep. I thus split PtrRep
* into
LiftedRep and UnliftedRep, so that the created Ids have the right
strictness.
* The RepType.RepType type was removed, as it didn't seem to help with
* much.
* The RepType.repType function is also removed, in favor of typePrimRep.
* I have waffled a good deal on whether or not to keep VoidRep in
TyCon.PrimRep. In the end, I decided to keep it there. PrimRep is *not*
represented in RuntimeRep, and typePrimRep will never return a list
including
VoidRep. But it's handy to have in, e.g., ByteCodeGen and friends. I can
imagine another design choice where we have a PrimRepV type that is
PrimRep
with an extra constructor. That seemed to be a heavier design, though,
and I'm
not sure what the benefit would be.
* The last, unused vestiges of # (unliftedTypeKind) have been removed.
* There were several pretty-printing bugs that this change exposed;
* these are fixed.
* We previously checked for levity polymorphism in the types of binders.
* But we
also must exclude levity polymorphism in function arguments. This is
hard to check
for, requiring a good deal of care in the desugarer. See Note [Levity
polymorphism
checking] in DsMonad.
* In order to efficiently check for levity polymorphism in functions, it
* was necessary
to add a new bit of IdInfo. See Note [Levity info] in IdInfo.
* It is now safe for unlifted types to be unsaturated in Core. Core Lint
* is updated
accordingly.
* We can only know strictness after zonking, so several checks around
* strictness
in the type-checker (checkStrictBinds, the check for unlifted variables
under a ~
pattern) have been moved to the desugarer.
* Along the way, I improved the treatment of unlifted vs. banged
* bindings. See
Note [Strict binds checks] in DsBinds and #13075.
* Now that we print type-checked source, we must be careful to print
* ConLikes correctly.
This is facilitated by a new HsConLikeOut constructor to HsExpr.
Particularly troublesome
are unlifted pattern synonyms that get an extra void# argument.
* Includes a submodule update for haddock, getting rid of #.
* New testcases:
typecheck/should_fail/StrictBinds
typecheck/should_fail/T12973
typecheck/should_run/StrictPats
typecheck/should_run/T12809
typecheck/should_fail/T13105
patsyn/should_fail/UnliftedPSBind
typecheck/should_fail/LevPolyBounded
typecheck/should_compile/T12987
typecheck/should_compile/T11736
* Fixed tickets:
#12809
#12973
#11736
#13075
#12987
* This also adds a test case for #13105. This test case is
* "compile_fail" and
succeeds, because I want the testsuite to monitor the error message.
When #13105 is fixed, the test case will compile cleanly.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow to unregister threadWaitReadSTM/threadWaitWriteSTM on
a non-threaded runtime. Previosly noop action was returned,
as a result it was not possible to unregister action, unless
data arrives to Fd or it's closed.
Fixes #12852.
Reviewers: simonmar, hvr, austin, bgamari, trofi
Reviewed By: bgamari, trofi
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2729
GHC Trac Issues: #12852
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the leak with `setProgArgv`. The problem was
that `setProgArgv` would not free the objects pointed
to by `prog_argc`, `prog_argv` when the globals were
changed resulting in a leak.
The only strictly necessary change is in `rts/RtsFlags.c`, but
the code in `System.Environment` was a bit confusing and not
exception safe, so I refactored it.
Test Plan: ./validate
Reviewers: simonmar, ezyang, austin, hvr, bgamari, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2576
GHC Trac Issues: #12664
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: The tests have been included. This change deals with a
relatively minor edge case and should not break unrelated functionality.
Reviewers: thomie, #core_libraries_committee, ekmett, bgamari
Reviewed By: #core_libraries_committee, ekmett, bgamari
Subscribers: bgamari, ekmett
Differential Revision: https://phabricator.haskell.org/D2391
GHC Trac Issues: #11632
|
|
|
|
| |
Fixes #12343.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem with ignore_output is that it hides errors for WAY=ghci.
GHCi always returns with exit code 0 (unless it is broken itself).
For example: ghci015 must have been failing with compile errors for
years, but we didn't notice because all output was ignored.
Therefore, replace all uses of ignore_output with either ignore_stderr
or ignore_stdout. In some cases I opted for adding the expected output.
Update submodule hpc and stm.
Reviewed by: simonmar
Differential Revision: https://phabricator.haskell.org/D2367
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I have get test failures on `openFile008` with
`openFile: resource exhausted (Too many open files)` when running
inside `./validate`, but not when I run the test individually.
I suspect that's because with `./validate` parallelism of 33 threads
I go just above the `1024` file descriptor limit.
This is probably related to the recent change:
`58f0086b70f2: Testsuite: open/close stdin/stdout/stderr explicitly`
but I haven't looked deep enough to understand exactly how.
I think bumping this is harmless, but I don't really know why it's
necessary at all.
Test Plan: ./validate
Reviewers: austin, thomie, hvr, bgamari, simonmar
Reviewed By: simonmar
Subscribers: simonmar
Differential Revision: https://phabricator.haskell.org/D2368
|