| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Fixes #16303
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GHCi's `:info` command was pretty-printing Haskell98-style data types
with explicit return kinds if the return kind wasn't `Type`. This
leads to bizarre output like this:
```
λ> :i (##)
data (##) :: TYPE ('GHC.Types.TupleRep '[]) = (##)
-- Defined in ‘GHC.Prim’
```
Or, with unlifted newtypes:
```
λ> newtype T = MkT Int#
λ> :i T
newtype T :: TYPE 'IntRep = MkT Int#
-- Defined at <interactive>:5:1
```
The solution is simple: just delete one part from `IfaceSyn` where
GHC mistakenly pretty-prints the return kinds for non-GADTs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was an awful lot of zipping going on in
canDecomposableTyConAppOK, and one of the lists being zipped
was too short, causing the result to be too short. Easily
fixed.
Also fixes #16204 and #16225
test case: typecheck/should_compile/T16188
typecheck/should_compile/T16204[ab]
typecheck/should_fail/T16204c
typecheck/should_compile/T16225
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This bug fixes three problems related to `Proxy#`/`proxy#`:
1. Reifying it with TH claims that the `Proxy#` type constructor has
two arguments, but that ought to be one for consistency with
TH's treatment for other primitive type constructors like `(->)`.
This was fixed by just returning the number of
`tyConVisibleTyVars` instead of using `tyConArity` (which includes
invisible arguments).
2. The role of `Proxy#`'s visible argument was hard-coded as nominal.
Easily fixed by changing it to phantom.
3. The visibility of `proxy#`'s kind argument was specified, which
is different from the `Proxy` constructor (which treats it as
inferred). Some minor refactoring in `proxyHashId` fixed ths up.
Along the way, I had to introduce a `mkSpecForAllTy` function, so
I did some related Haddock cleanup in `Type`, where that function
lives.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This adds a handful of LLVM flavours and the accompanying
documentation. These flavours are mostly uninteresting, but
exist in the Make system.
|
| |
|
|
|
|
| |
See #16193.
|
|
|
|
|
|
|
|
|
|
| |
This patch makes the JUnit output more useful as now we also report the
stdout/stderr in the message which can be used to quickly identify why a
test is failing without downloading the log.
This also introduces TestResult,
previously we were simply passing around tuples, making things the
implementation rather difficult to follow and harder to extend.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a regression caused by #15471 where splicing in a trivial
program such as `[|| return () ||]` would fail as the dictionary for
`return` would never get bound in the module containing the splice.
Arguably this is symptomatic of a major problem affecting TTH where we
serialise renamed asts and then retype check them. The reference to the
dictionary should be fully determined at the quote site so that splicing
doesn't have to solve any implicits at all. It's a coincidence this
works due to coherence but see #15863 and #15865 for examples where
things do go very wrong.
Fixes #16195
|
| |
|
| |
|
|
|
|
|
|
| |
The invalid doc comments were exposed by 24b39ce53eedad4cefc30f6786542d2072d1f9b0.
The fix is to properly escaped the `{-` and `-}` in the doc comments.
Some other miscallaneous markup issues are also fixed.
|
|
|
|
|
|
|
|
| |
The behviour of `lexTokenStream` around position pragma was
accidentally inverted in 469fe6133646df5568c9486de2202124cb734242.
This fixes that bug.
This also unbreaks #16239.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new implementation isn't tailrecursive and instead
builds up the initial part of the list as it goes.
This improves allocation numbers as we don't build up an intermediate
list just to reverse it later.
This is slightly slower for lists of size <= 3. But in benchmarks
significantly faster for any list above 5 elements, assuming the
majority of the resulting list will be evaluated.
|
|
|
|
|
|
| |
These never used the first part of the result from snocView.
Hence replacing them with last[Maybe] is both clearer and
gives better performance.
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously, in getFamDeclInitialKind, we were figuring
out whether the enclosing class decl had a CUSK very
indirectly, via tcTyConIsPoly. This patch just makes
the computation much more direct and easy to grok.
No change in behaviour.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- breakpointAuto
- breakpointJump
- breakpointCondJump
- breakpointAutoJump
These Ids are never defined, but there were definitions about those in
PrelNames. Those are now removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The definition of 'optSemi' claimed it had type
([Located a],Bool)
Note that its production actually returns ([Located Token],Bool):
: ';' { ([$1],True) } -- $1 :: Located Token
Due to an infelicity in the implementation of 'happy -c', it effectively
resulted in 'unsafeCoerce :: Token -> a'.
See https://github.com/simonmar/happy/pull/134
If any consumer of 'optSemi' tried to instantiate 'a' to something not
representationally equal to 'Token', they would experience a segfault.
In addition to that, this definition made it impossible to compile Parser.y
without the -c flag (as it's reliant on this bug to cast 'Token' to 'forall
a. a').
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* GHC now performs constant folding on bit operations like (.|.) so we
use them and we remove the misleading comment
* we use Word8 instead of Int and we remove the useless conversion to
Int32. Hopefully future releases of GHC could transform the big case in
`charType` into a value table indexing instead of a jump table. Word8
would make the table smaller.
* we use INLINABLE pragma instead of INLINE on `is_ctype`: in my test,
the latter *prevents* `is_ctype` to be inlined because `charType` is
inlined into `is_ctype` (to call charType`s worker on the unboxed Char
directly).
|
|
|
|
| |
This was warning on i386.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the alternate layout rule is activated via a pragma, it injects
tokens for { and } to make sure that the source is parsed properly.
But it injects ITocurly and ITccurly, rather than their virtual
counterparts ITvocurly and ITvccurly.
This causes problems for ghc-exactprint, which tries to print these.
Likewise, any injected ITsemi should have a zero-width SrcSpan.
Test case (the existing T13087.hs)
{-# LANGUAGE AlternativeLayoutRule #-}
{-# LANGUAGE LambdaCase #-}
isOne :: Int -> Bool
isOne = \case 1 -> True
_ -> False
main = return ()
Closes #16279
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch from https://phabricator.haskell.org/D4865 introduces
go _ (HsParTy _ (dL->L l (HsStarTy _ isUni))) acc ann fix
= do { warnStarBndr l
; let name = mkOccName tcClsName (if isUni then "★" else "*")
; return (cL l (Unqual name), acc, fix, ann) }
which discards the parens annotations belonging to the HsParTy.
Updates haddock submodule
Closes #16265
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the code
type family F1 (a :: k) (f :: k -> Type) :: Type where
F1 @Peano a f = T @Peano f a
the API annotation for the first @ is not attached to a SourceSpan in
the ParsedSource
Closes #16236
|
|
|
|
|
|
|
| |
The AnnForall annotations introduced via Phab:D4894 are not always
attached to the correct SourceSpan.
Closes #16230
|
|
|
|
| |
#16248
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The graph allocator now dynamically resizes the number of stack
slots when running into the limit.
This fixes #8657.
Also loop membership of basic blocks is now available
in the register allocator for cost heuristics.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This ports the fix to #12919 to the normaliser. (#12919 was about
the flattener.) Because the fix is involved, this is done by
moving the critical piece of code to Coercion, and then calling
this from both the flattener and the normaliser.
The key bit is: simplifying type families in a type is always
a *homogeneous* operation. See #12919 for a discussion of why
this is the Right Way to simplify type families.
Also fixes #15549.
test case: dependent/should_compile/T14729{,kind}
typecheck/should_compile/T15549[ab]
|
|
|
|
| |
As noted in #16251.
|
|
|
|
| |
As noted in #16113, these trigger an assertion in isUnliftedRuntimeRep.
|
|
|
|
| |
As noted in #14759, this triggers a warning in ListSetOps.
|
|
|
|
| |
As noted in #16112.
|