| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Rejig CtLoc
* CtLoc is now *not* parameterised (much simpler)
* CtLoc includes the "depth" of the constraint
* CtLoc includes the TcLclEnv at the birthplace
That gives (a) the SrcSpan, (b) the [ErrCtxt]
(c) the [TcIdBinder]
* The CtLoc of a constraint is no longer in its CtEvidence
* Where we passed 'depth' before, now we pass CtLoc
2. Some significant refactoring in TcErrors
* Get rid of cec_extra
* Traverse every constraint, so that we can be
sure to generate bindings where necessary.
(This was really a lurking bug before.)
3. Merge zonking into TcCanonical. This turned out to be
almost trivial; just a small change to TcCanonical.flattenTyVar.
The nice consequence is that we don't need to zonk a constraint
before solving it; instead it gets zonked "on the fly" as it were.
|
| |
|
|
|
|
| |
I've totally forgotten what this patch is fixing, but it's all about
getting the right source location for class methods. It's fairly
minor, but annoying that I can't connect it with a Trac ticket
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This single commit combines a lot of work done by
Thijs Alkemade <thijsalkemade@gmail.com>, plus a slew
of subsequent refactoring by Simon PJ.
The basic idea is
* Add a new expression form "_", a hole, standing for a not-yet-written expression
* Give a useful error message that
(a) gives the type of the hole
(b) gives the types of some enclosing value bindings that
mention the hole
Driven by this goal I did a LOT of refactoring in TcErrors, which in turn
allows us to report enclosing value bindings for other errors, not just
holes. (Thijs rightly did not attempt this!)
The major data type change is a new form of constraint
data Ct = ...
| CHoleCan {
cc_ev :: CtEvidence,
cc_hole_ty :: TcTauType,
cc_depth :: SubGoalDepth }
I'm still in two minds about whether this is the best plan. Another
possibility would be to have a predicate type for holes, somthing like
class Hole a where
holeValue :: a
It works the way it is, but there are some annoying special cases for
CHoleCan (just grep for "CHoleCan").
|
| |\
| |
| |
| |
| |
| | |
Conflicts:
compiler/typecheck/TcMType.lhs
compiler/typecheck/TcSMonad.lhs
|
| | |\ |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We were missing a case, so that you could expose a constructor
with UNPACKed fields, but the field tpye was trimmed, and hence
can't be expanded.
Fixes Trac #5252 (revived)
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When converting from Core to STG, we swith pattern matching on
on a *nullary* unboxed tuple into matching using a PrimAlt on RealWorld#
case e (RealWorld#) of { DEFAULT -> ... }
This semms messy to me, but it works. There was a bug in that we were
changing to PrimAlt, but not using a DEFAULT AltCon.
|
| | |\ \
| | |/ |
|
| | | |
| | |
| | |
| | | |
This frees wORD_SIZE up to be moved out of HaskellConstants
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
Also moved the type definition into RegAlloc.Linear.State to de-orphan
the Monad instance.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |\ |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | |/ |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
This means that we get e.g.
pc_OFFSET_stgEagerBlackholeInfo = -24
rather than
pc_OFFSET_stgEagerBlackholeInfo = 18446744073709551592
|
| | | | |
|
| | | |
| | |
| | |
| | | |
It no longer generates anything
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
We now also generate nice wrappers for the platformConstants
methods. For now it's all commented out as the definitions
conflict with those in Constants.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
It is only generated when mode is Gen_Header; i.e. it's not used
in the compiler, only the RTS.
|
| | | |
| | |
| | |
| | | |
We now generate a platformConstants file that we can read at runtime.
|
| | | |
| | |
| | |
| | |
| | | |
This means we only need to build one copy of the program, which
will make life simpler as I plan to add more variants.
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
I've switched to passing DynFlags rather than Platform, as (a) it's
simpler to not have to extract targetPlatform in so many places, and
(b) it may be useful to have DynFlags around in future.
|
| | | | |
|
| | | | |
|
| | | | |
|