| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As discussed in #8276, this code was somewhat broken because while you
could always revert the actual argument list, you can never revert the
CAFs upon which they are based - so really this didn't buy you much.
However, Haddock in particular expects to be able to parse GHC flags,
including static flags, and used this code to do so. In its place, we
instead have discardStaticFlags, which will safely remove any of the
remaining 5 flags from a list of arguments. Haddock instead discards
these, as they aren't related to anything it does anyway (mostly
controlling debugging output and some basic optimizer phases.)
This fixes #8276. In the future, we will eventually completely remove
the remaining StaticFlags, removing the need for this fix. Unfortunately
these changes will be quite invasive and require more time.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Edward and I noticed this - like realWorld#, we want things applied to
proxy# which are INLINE more likely to be inlined - we do this by
marking proxy# as having an evaldUnfolding, which in turn makes it look
like the primitive is evaluated and makes the simplifier more willing to
do so.
See Note [evaldUnfoldings] in MkId.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
| |
Thanks to Gergely Risko for pointing this out.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
| |
Authored-by: Gergely Risko <gergely@risko.hu>
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Fixes: #7685
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This is to avoid
rts/sm/Storage.c: In function ‘allocate’:
rts/sm/Storage.c:725:13:
error: multi-line comment [-Werror=comment]
cc1: all warnings being treated as errors
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
| |
|
|
|
|
|
|
| |
See [6f3a194accd2a1a75a3f86c1b4dca30521488110/base]
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| | |
Template Haskell module finalizers are run after a module is type checked.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The essence of this change is that a TExp a now wraps a TH.Exp instead of a
TH.ExpQ. This means:
* A typed bracket [||...||] now has type Q (TExp tau), where tau is the type of
the expression in the bracket.
* A typed splice $(...) must contain a value of type Q (TExp tau), and has
type tau.
Previously, typed brackets had type TExp tau, and typed splices had to contain a
value of type TExp tau.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Since declaration splices are now untyped, they can be used anywhere a
declaration is valid, including in declaration brackets.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Also check for illegal typed/untyped bracket/splice combinations.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Right now the syntax for typed expression brackets and splices maps to
conventional brackets and splices, i.e., they are not typed.
|
| | |
|
|/
|
|
| |
This structure now matches that of the type checker.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of walking over the source decls, and looking up the Name
to find the TyCon or whatever, we just walk over the list of
TyThings that have been brought into scope. This is much tidier.
The only wrinkle is that, since we don't have the original declaration,
we don't have its SrcSpan to put in the error message. I fixed this
by making the SrcSpan for the TyCon itself be the span of the whole
declaration. This actually makes sense anyway.
There are bunch of error message wibbles in consequence.
|
| |
|
| |
|
|
|
|
|
|
|
| |
In particular, don't import GHC (a historical hangover), which
makes this module live much lower down in the module hierarchy.
This in turn means we can call it from TcRnDriver
|
| |
|
|
|
|
|
|
|
| |
Reid Barton's diagnosis was right on the mark, though the fix
wasn't quite right. See Note [Implementing tagToEnum#].
As usual I did some refactoring.
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two different fixes were necessary here. First, we need to fail eagerly
in kcConDecl, to prevent the return-type error in tcConDecl from firing
twice. (This wasn't caught earlier because of the eager fail in the
datatype kind-checking code -- which isn't used for data instances!)
We also must check again in tcDataFamInstDecl, because it's possible for
a data instance return type to have the right head but the wrong body
(i.e., doesn't conform to the data instance type patterns). This check
is only possible *after* desugaring from HsType to Type, so it can't be
done in tcConRes with the first check.
This is documented in a comment at check_valid_data_con, a local
function within tcDataFamInstDecl.
|
|
|
|
| |
See Note [Closing over kinds in coverage] in FunDeps
|
|
|
|
| |
c.f. commit 0b0fec536e35769b64b8bc5397c84138fa512155
|
|
|
|
|
|
|
|
|
| |
* Add a suggestion to add AllowAmbiguousTypes when there is an
ambiguity error
* Move some of the logic to tcSimplifyAmbiguityCheck
* Report inaccessible code regardless of the ambiguity check
|
|
|
|
|
|
|
|
|
| |
In particular, the mi_ann_fn field in ModIface was only being used
totally locally in MkIface, so I made it local.
Other than that I just refactored data types slightly,
* Adding synonym Annotations.AnnPayload for the cryptic Serialized
* Adding MkIface.IfaceIdExtras to common up some of the identical code
|