| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch provides user with a better hint when most RTS options
are not available (not compiled with `-rtsopts`).
A new field "rtsOptsEnabled" is added into RtsFlags.MiscFlags to
tell the availablity of RTS options.
Some concerns:
* Unlike other flag fields in "libraries/base/GHC/RTS/Flags.hsc",
"RtsOptsEnabled" is defined in "includes/RtsAPI.h" and lacks
constant macros. Therefore In "GHC.RTS", "RtsOptsEnabled" simply
derives Enum instance and reads as of type "CInt".
* There are other ways to change RTS options (e.g. `-with-rtsopts`),
but it might be too verbose to mention.
Test Plan: validate
Reviewers: austin, hvr, thomie, simonmar
Reviewed By: thomie
Subscribers: thomie, rwbarton
Differential Revision: https://phabricator.haskell.org/D767
GHC Trac Issues: #9579
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The changes are:
1. No impredicative types in `Typeable`
2. Distinguish normal tuples, from tuples of constraints.
|
|
|
|
|
|
|
| |
The situation is similar to `Typeable`---we can't set the evidence
outside the solver because we have custom solving rules. This is safe
because the computed super-class instances can't possibly depend
on the new instance.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This improves how the Call Arity deals with "boring" variables. Boring
variables are those where it does not bother to include in the analysis
result, so whenever something is looked up in the analysis result, we
have to make a conservative assumption about them.
Previously, we extended the result with such conservative information
about them, to keep the code uniform, but that could blow up the amount
of data passed around, even if only temporarily, and slowed things down.
We now pass around an explicit list (well, set) of variable that are
boring and take that into account whenever we use the result. Not as
pretty, but noticably faster.
|
|
|
|
|
|
|
|
|
| |
See Note [Closing over kinds in coverage] in FunDeps.
I'd already fixed this bug once, for Trac #8391, but I put the
call to closeOverKinds in the wrong place, so Trac #10109
failed. (It checks the /liberal/ coverage condition, which
The fix was easy: move the call to the right place!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The astonishingly-ingenious trio of
Shachaf Ben-Kiki, Ørjan Johansen and Nathan van Doorn
managed to persuade GHC 7.10.1 to cough up unsafeCoerce.
That is very bad. This patch fixes it by no allowing Typable
on Constraint-kinded things. And that seems right, since
it is, in effect, a form of impredicative polymorphism,
which Typeable definitely doesn't support.
We may want to creep back in the direction of allowing
Typeable on constraints one day, but this is a good
fix for now, and closes a terrible hole.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is currently no way to separate whether UnicodeSyntax is accepted
for input from the corresponding output syntax using unicode symbols.
This patch implements a separate flag for affecting ghc(i)'s output.
Signed-off-by: Bertram Felgenhauer <int-e@gmx.de>
Reviewed By: nomeata, austin
Differential Revision: https://phabricator.haskell.org/D807
GHC Trac Issues: #8959
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When parsing a nested comment, such as
{-
{- nested comment -}
{-# nested pragma #-}
-}
The lexer returns the comment annotation as
{-
{- nested comment
{-# nested pragma #
-}
Restore the missing comment end markers in the annotation.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D829
GHC Trac Issues: #10277
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In RdrHsSyn.checkAPat the processing for ExprWithTySig is defined as
ExprWithTySig e t _ -> do e <- checkLPat msg e
-- Pattern signatures are parsed as sigtypes,
-- but they aren't explicit forall points. Hence
-- we have to remove the implicit forall here.
let t' = case t of
L _ (HsForAllTy Implicit _ _
(L _ []) ty) -> ty
other -> other
return (SigPatIn e (mkHsWithBndrs t'))
The t' variable ends up losing its original SrcSpan in the first case
branch. This results in annotations becoming detached from the AST.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D823
GHC Trac Issues: #10255
|
|
|
|
|
|
|
|
|
|
|
| |
Add "error:" prefix to error-messages, also lowercase "Warning:"
message to match GCC behavior closer.
Reviewed By: thomie, austin
Differential Revision: https://phabricator.haskell.org/D811
GHC Trac Issues: #10021
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trac #10218 reports a subtle bug that turned out to be:
- CSE invalidated the usage information computed
by earlier demand analysis, by increasing sharing
- that made a single-entry thunk into a multi-entry thunk
- and with -feager-blackholing, that led to <<loop>>
The patch fixes it by making the CSE pass zap usage information for
let-bound identifiers. It can be restored by -flate-dmd-anal.
(But making -flate-dmd-anal the default needs some careful work;
see Trac #7782.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The opt_sig production is defined as
opt_sig :: { ([AddAnn],Maybe (LHsType RdrName)) }
: {- empty -} { ([],Nothing) }
| '::' sigtype { ([mj AnnDcolon $1],Just $2) }
It is used in the alt and decl_no_th productions, but neither of them
add the returned annotations.
This commit captures the annotations in the calling productions.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D822
GHC Trac Issues: #10254
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `guardquals1` production includes
: guardquals1 ',' qual {% addAnnotation (gl $ last $ unLoc $1) AnnComma
(gl $2) >>
return (sLL $1 $> ($3 : unLoc $1)) }
The AnnComma should be attached to `(gl $ head $ unLoc $1)`, rather than
`last`.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D818
GHC Trac Issues: #10256
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The production for opt_kind_sig is
opt_kind_sig :: { Located (Maybe (LHsKind RdrName)) }
: { noLoc Nothing }
| '::' kind {% ajl (sLL $1 $> (Just $2)) AnnDcolon (gl $1) }
The outer Location is used only to get the full span for the enclosing
declration, and is then stripped. The inner LHsKind then has a SrcSpan that does
not include the '::'
Extend the SrcSpan on $2 to include $1
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D813
GHC Trac Issues: #10209
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We're getting rid of -sig-of foo:A usage, because
it doesn't make sense in any compilation mode besides one-shot,
and we don't expect users to use it anyway.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D789
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
A common pattern when programming with signatures is to combine multiple
signatures together (signature linking). We achieve this by making it
not-an-error to have multiple, distinct interface files for the same module
name, as long as they have the same backing implementation. When a user
imports a module name, they get ALL matching signatures dumped into their
scope.
On the way, I refactored the module finder code, which now distinguishes
between exact finds (when you had a 'Module') and regular finds (when
you had a 'ModuleName'). I also refactored the package finder code to
use a Monoid instance on LookupResult to collect together various results.
ToDo: At the moment, if a signature is declared in the local package,
it completely overrides any remote signatures. Eventually, we'll want
to also pull in the remote signatures (or even override the local signature,
if the full implementation is available.) There are bunch of ToDos in the
code for what to do once this is done.
ToDo: At the moment, whenever a module name lookup occurs in GHCi and we
would have seen a signature, we instead continue and return the Module
for the backing implementation. This is correct for most cases, but there
might be some situations where we want something a little more fine-grained
(e.g. :browse should only list identifiers which are available through
the in-scope signatures, and not ALL of them.)
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, hvr, austin
Subscribers: carter, thomie
Differential Revision: https://phabricator.haskell.org/D790
GHC Trac Issues: #9252
|
| |
|
|
|
|
|
|
| |
..due to suppressing base-package module names.
Needs a submodule update on array.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This diff depends on D803.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D806
GHC Trac Issues: #10214
|
|
|
|
|
|
|
|
| |
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D803
GHC Trac Issues: #10207
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In commit 3f30912f an include `ghcconfig.h` was added for
`WORDS_BIGENDIAN`.
Converting the floating point array to a `Word64` array avoids
using the preprocessor altogether and leads to smaller code.
Fixes #10239
Reviewed By: rwbarton, austin
Differential Revision: https://phabricator.haskell.org/D795
GHC Trac Issues: #10239
|
|
|
|
| |
This fixes Trac #10194
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes Trac #10195
For some reason we considered untouchability before, but Trac #10195
shows that this is positively worng.
See Note [Instance and Given overlap] in TcInteract.
Looking at the Git log, it seems that this bug was introduced at the
same time that we introduced the Given/Wanted overlap check in the first
place.
|
|
|
|
| |
Cosmetic consistency only
|
|
|
|
|
|
|
| |
We were erroneously quantifying over the function when it
had a dictionary type. A bit pathological, but possible.
This fixes Trac #10251
|
|
|
|
| |
This fixes Trac #10233
|
| |
|
|
|
|
|
|
|
|
|
| |
And mention more prominently that `-DDEBUG` and tests that call
`compiler_stats_num_fields` don't play well together
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D799
|
|
|
|
|
|
|
|
|
| |
* don't call `nlHsPar`, as `genOpApp` already does so.
* don't reimplement `isUnboxedTupleTyCon` and `isBoxedTupleTyCon`.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D798
|
|
|
|
|
|
| |
Reviewed By: thomie
Differential Revision: https://phabricator.haskell.org/D779
|
|
|
|
|
| |
still marked known_broken. This also adds the test case for #10245,
which should pass once #10246 is fixed.
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
[skip ci]
|
|
|
|
|
|
| |
Reviewed By: hvr, austin
Differential Revision: https://phabricator.haskell.org/D770
|
|
|
|
|
|
|
|
| |
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D768
GHC Trac Issues: #10188
|
| |
|
|
|
|
|
|
|
|
| |
Reviewed By: nomeata, thomie
Differential Revision: https://phabricator.haskell.org/D760
Signed-off-by: Dave Laing <dave.laing.80@gmail.com>
|
|
|
|
|
|
| |
Reviewed By: simonpj, austin
Differential Revision: https://phabricator.haskell.org/D741
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`.hspp` and `.hscpp` are haskell files that have already been preprocessed.
Treat `.hspp` and `.hscpp` as Haskellish sources again, as they were before
commit a10e1990. This way, ghc --make will load their imports.
Make sure that `.cmm` and `.cmmcpp` are still not treated as Haskellish,
by moving them out of `haskell_src_suffixes` (but still keeping them in
haskellish_suffixes, though I'm not sure what the purpose of that group
is).
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D778
|
|
|
|
|
|
|
|
|
| |
Just do nothing instead. This bug only shows up when using `-x hspp` in
--make mode on registerised builds.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D776
|