| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This reverts commit d87b38a2519212aaf8bad927c65abecc509a7212.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trac #16287 shows that we were checking for unsaturated type synonym
arguments (in `:kind`) when the argument was to a type synonym, but
_not_ when the argument was to some other form of type constructor,
such as a data type. The solution is to use the machinery that
rejects unsaturated type synonym arguments (previously confined to
`check_syn_tc_app`) to `check_arg_type`, which checks these other
forms of arguments. While I was in town, I cleaned up
`check_syn_tc_app` a bit to only invoke `check_arg_type` so as to
minimize the number of different code paths that that function could
go down.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
By default, when a module is compiled with plugins, it will be marked as
unsafe. With this flag passed, all plugins are treated as trustworthy
and the safety inference will no longer be affected.
This fixes Trac #16260.
|
| |
|
|
|
|
| |
As noted in #16205 this configuration reliably segfaults.
|
| |
|
|
|
|
|
|
|
| |
As noted in #16227 this test routinely times out when run in the
unregisterised way.
See also #15467.
|
| |
|
|
|
|
|
| |
This function makes it easy to turn on `-Werror` in the correct manner
to mimic how CI turns on -Werror.
|
| |
|
|
|
|
|
| |
`-interactive-print` doesn't accept **expr** as `-e` or `:def` does. It must
be a qualified or unqualified **name** in scope.
|
|
|
|
| |
This mirrors Hadrian and it good enough to get us unstuck.
|
| |
|
| |
|