| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
This is only for their respective codebases.
|
|
|
|
|
| |
This fixes the error message given by configure when the user
attempts to configure without first download the win32 tarballs.
|
|
|
|
|
|
|
|
| |
Metric Increase:
ManyConstructors
Metric Decrease:
T4029
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Currently we're passing a indexWord8OffAddr# type function to
utf8DecodeLazy# which then passes it on to utf8DecodeChar#. By passing one
of utf8DecodeCharAddr# or utf8DecodeCharByteArray# instead we benefit from
the inlining and specialization already done for those.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are multiple reasons we want this:
- Fewer allocations: ByteString has 3 fields, ShortByteString just has one.
- ByteString memory is pinned:
- This can cause fragmentation issues (see for example #13110) but also
- makes using FastStrings in compact regions impossible.
Metric Decrease:
T5837
T12150
T12234
T12425
|
| |
|
|
|
|
|
|
| |
instance.
[skip ci]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Haddock comments are, first and foremost, comments. It's very annoying
to incorporate them into the grammar. We can take advantage of an
important property: adding a Haddock comment does not change the parse
tree in any way other than wrapping some nodes in HsDocTy and the like
(and if it does, that's a bug).
This patch implements the following:
* Accumulate Haddock comments with their locations in the P monad.
This is handled in the lexer.
* After parsing, do a pass over the AST to associate Haddock comments
with AST nodes using location info.
* Report the leftover comments to the user as a warning (-Winvalid-haddock).
|
|
|
|
| |
It was missing a newline.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are three problems with the current API:
1. It is hard to properly write instances for ``Quote m => m (TExp a)`` as the type is the composition
of two type constructors. Doing so in your program involves making your own newtype and
doing a lot of wrapping/unwrapping.
For example, if I want to create a language which I can either run immediately or
generate code from I could write the following with the new API. ::
class Lang r where
_int :: Int -> r Int
_if :: r Bool -> r a -> r a -> r a
instance Lang Identity where
_int = Identity
_if (Identity b) (Identity t) (Identity f) = Identity (if b then t else f)
instance Quote m => Lang (Code m) where
_int = liftTyped
_if cb ct cf = [|| if $$cb then $$ct else $$cf ||]
2. When doing code generation it is common to want to store code fragments in
a map. When doing typed code generation, these code fragments contain a
type index so it is desirable to store them in one of the parameterised
map data types such as ``DMap`` from ``dependent-map`` or ``MapF`` from
``parameterized-utils``.
::
compiler :: Env -> AST a -> Code Q a
data AST a where ...
data Ident a = ...
type Env = MapF Ident (Code Q)
newtype Code m a = Code (m (TExp a))
In this example, the ``MapF`` maps an ``Ident String`` directly to a ``Code Q String``.
Using one of these map types currently requires creating your own newtype and constantly
wrapping every quotation and unwrapping it when using a splice. Achievable, but
it creates even more syntactic noise than normal metaprogramming.
3. ``m (TExp a)`` is ugly to read and write, understanding ``Code m a`` is
easier. This is a weak reason but one everyone
can surely agree with.
Updates text submodule.
|
|
|
|
| |
[skip ci]
|
| |
|
|
|
|
|
|
|
|
|
| |
* add StgPprOpts datatype
* remove Outputable instances for types that need `StgPprOpts` to be
pretty-printed and explicitly call type specific ppr functions
* add default `panicStgPprOpts` for panic messages (when it's not
convenient to thread StgPprOpts or DynFlags down to the ppr function
call)
|
|
|
|
|
|
| |
This reverts commit 686e72253aed3880268dd6858eadd8c320f09e97.
Signed-off-by: Moritz Angermann <moritz.angermann@gmail.com>
|
|
|
|
|
|
| |
This reverts commit 3f60b94de1f460ca3f689152860b108a19ce193e.
Signed-off-by: Moritz Angermann <moritz.angermann@gmail.com>
|
|
|
|
|
|
| |
This reverts commit 7abffced01f5680efafe44f6be2733eab321b039.
Signed-off-by: Moritz Angermann <moritz.angermann@gmail.com>
|
|
|
|
|
|
| |
This reverts commit cdfeb3f24f76e8fd30452016676e56fbc827789a.
Signed-off-by: Moritz Angermann <moritz.angermann@gmail.com>
|
|
|
|
|
| |
In particular I have seen T16012 fail repeatedly under the
unregisterised compiler.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This MR (for #18449) refactors the Simplifier's treatment
of join-point binders.
Specifically, it puts together, into
GHC.Core.Opt.Simplify.Env.adjustJoinPointType
two currently-separate ways in which we adjust the type of
a join point. As the comment says:
-- (adjustJoinPointType mult new_res_ty join_id) does two things:
--
-- 1. Set the return type of the join_id to new_res_ty
-- See Note [Return type for join points]
--
-- 2. Adjust the multiplicity of arrows in join_id's type, as
-- directed by 'mult'. See Note [Scaling join point arguments]
I think this actually fixes a latent bug, by ensuring that the
seIdSubst and seInScope have the right multiplicity on the type
of join points.
I did some tidying up while I was at it. No more
setJoinResTy, or modifyJoinResTy: instead it's done locally in
Simplify.Env.adjustJoinPointType
|
|
|
|
|
|
|
| |
This pragma has no effect since 2011.
It was introduced for External Core, which no longer exists.
Updates haddock submodule.
|
|
|
|
|
|
|
|
|
|
| |
This patch (due to Richard Eisenberg) improves
documentation of the wrapper returned by tcSubMult
(see Note [Wrapper returned from tcSubMult] in
GHC.Tc.Utils.Unify).
And, more substantially, it cleans up the multiplicity
handling in the typechecking of NPlusKPat
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As #18412 points out, it should be OK for multiple case alternatives
to have a higher rank type, provided they are all the same.
This patch implements that change. It sweeps away
GHC.Tc.Gen.Match.tauifyMultipleBranches, and friends, replacing it
with an enhanced version of fillInferResult.
The basic change to fillInferResult is to permit the case in which
another case alternative has already filled in the result; and in
that case simply unify. It's very simple actually.
See the new Note [fillInferResult] in TcMType
Other refactoring:
- Move all the InferResult code to one place, in GHC.Tc.Utils.TcMType
(previously some of it was in Unify)
- Move tcInstType and friends from TcMType to Instantiate, where it
more properly belongs. (TCMType was getting very long.)
|
| |
|
|
|
|
|
|
|
|
| |
Follow-up of https://gitlab.haskell.org/ghc/ghc/-/issues/18403
This MR adds `fullCompilerVersion`, a function that shares the same
backend as the `--numeric-version` GHC flag, exposing a full,
three-digit version datatype.
|
|
|
|
| |
Fixes #18281.
|
|\ |
|
| |
| |
| |
| | |
Reverts many of the testsuite changes
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
The warning about rtsopts having no consequences is expected.
So accept new stderr.
|
| | |
|
| |
| |
| |
| |
| | |
We used to filter rtsopts, i opted to instead just accept the warning of it having no effect.
This works both for -rtsopts, as well as -with-rtsopts which winio adds.
|
| |
| |
| |
| | |
Demand cabal 2.0 syntax instead of >= 1.20 as required by newer cabal versions.
|