summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Another refactoring of constraintsSimon Peyton Jones2012-09-1713-887/+695
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Improve the binding location of class methods (I think)Simon Peyton Jones2012-09-174-41/+47
| | | | | | 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
* Comments about how the untouchables stuff worksSimon Peyton Jones2012-09-171-26/+85
|
* Spelling in comments onlySimon Peyton Jones2012-09-171-1/+1
|
* Add type "holes", enabled by -XTypeHoles, Trac #5910Simon Peyton Jones2012-09-1720-401/+565
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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").
* Merge remote-tracking branch 'origin/master' into tc-untouchablesSimon Peyton Jones2012-09-17221-5443/+6010
|\ | | | | | | | | | | Conflicts: compiler/typecheck/TcMType.lhs compiler/typecheck/TcSMonad.lhs
| * Merge branch 'master' of http://darcs.haskell.org/ghcSimon Peyton Jones2012-09-1770-813/+828
| |\
| | * Move tAG_BITS into platformConstantsIan Lynagh2012-09-1619-125/+130
| | |
| | * Move more constants to platformConstantsIan Lynagh2012-09-167-35/+23
| | |
| | * Move wORD_SIZE into platformConstantsIan Lynagh2012-09-1663-552/+551
| | |
| | * Pass DynFlags down to llvmWordIan Lynagh2012-09-166-107/+128
| | |
| | * Windows build fixIan Lynagh2012-09-161-6/+8
| | |
| * | Print literal integers in External Core.Simon Peyton Jones2012-09-151-1/+2
| | |
| * | Fix UNPACK with -fomit-interface-pragmas.Simon Peyton Jones2012-09-151-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | Comments and laout onlySimon Peyton Jones2012-09-151-49/+103
| | |
| * | Fix Trac #7237; mixup with empty tuplesSimon Peyton Jones2012-09-152-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Merge remote branch 'origin/master'Simon Peyton Jones2012-09-15170-4059/+4498
| |\ \ | | |/
| | * Move wORD_SIZE_IN_BITS to DynFlagsIan Lynagh2012-09-1411-113/+119
| | | | | | | | | | | | This frees wORD_SIZE up to be moved out of HaskellConstants
| | * Move some more constants into platformConstantsIan Lynagh2012-09-1418-101/+105
| | |
| | * Remove more Platform argumentsIan Lynagh2012-09-142-50/+51
| | |
| | * Whitespace only in nativeGen/RegAlloc/Linear/JoinToTargets.hsIan Lynagh2012-09-141-205/+196
| | |
| | * Remove more Platform argumentsIan Lynagh2012-09-143-30/+33
| | |
| | * Remove a load of Platform arguments from RegM functionsIan Lynagh2012-09-141-74/+73
| | |
| | * Put DynFlags into the RegM monadIan Lynagh2012-09-143-20/+26
| | | | | | | | | | | | | | | Also moved the type definition into RegAlloc.Linear.State to de-orphan the Monad instance.
| | * Whitespace only in nativeGen/RegAlloc/Linear/State.hsIan Lynagh2012-09-141-55/+50
| | |
| | * Move more constants to platformConstantsIan Lynagh2012-09-147-53/+46
| | |
| | * MAX_REAL_LONG_REG is always defined, so no need to test itIan Lynagh2012-09-141-7/+1
| | |
| | * Move more constants into platformConstantsIan Lynagh2012-09-148-109/+107
| | |
| | * Merge branch 'master' of mac:ghc/git/val32/.Ian Lynagh2012-09-1414-46/+46
| | |\
| | | * More OS X build fixesIan Lynagh2012-09-1414-46/+46
| | | |
| | * | Move some more constants fo platformConstantsIan Lynagh2012-09-148-36/+31
| | | |
| | * | Check for Int constants that are too large in mkDerivedConstantsIan Lynagh2012-09-141-0/+14
| | | |
| | * | Start moving other constants from (Haskell)Constants to platformConstantsIan Lynagh2012-09-144-12/+28
| | |/
| | * Fix build on OS XIan Lynagh2012-09-141-1/+1
| | |
| | * Use intptr_t for offset values in mkDerivedConstantsIan Lynagh2012-09-131-2/+3
| | | | | | | | | | | | | | | | | | | | | This means that we get e.g. pc_OFFSET_stgEagerBlackholeInfo = -24 rather than pc_OFFSET_stgEagerBlackholeInfo = 18446744073709551592
| | * Remove some unused HaskellConstants entriesIan Lynagh2012-09-131-13/+0
| | |
| | * Remove the --gen-haskell mode of mkDerivedConstantsIan Lynagh2012-09-133-43/+5
| | | | | | | | | | | | It no longer generates anything
| | * Use oFFSET_* from platformConstants rather than ConstantsIan Lynagh2012-09-1313-124/+127
| | |
| | * Use sIZEOF_* from platformConstants rather than ConstantsIan Lynagh2012-09-138-14/+12
| | |
| | * Add a couple more mkDerivedConstants modesIan Lynagh2012-09-134-1/+67
| | | | | | | | | | | | | | | | | | 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.
| | * We need to install the platformConstants fileIan Lynagh2012-09-131-0/+2
| | |
| | * Make the Windows-specific part of mkDerivedConstants.c conditionalIan Lynagh2012-09-131-4/+9
| | | | | | | | | | | | | | | It is only generated when mode is Gen_Header; i.e. it's not used in the compiler, only the RTS.
| | * Add more modes to mkDerivedConstantsIan Lynagh2012-09-136-12/+116
| | | | | | | | | | | | We now generate a platformConstants file that we can read at runtime.
| | * Use conditionals rather than CPP in mkDerivedConstantsIan Lynagh2012-09-134-130/+156
| | | | | | | | | | | | | | | This means we only need to build one copy of the program, which will make life simpler as I plan to add more variants.
| | * Pass DynFlags down to wordWidthIan Lynagh2012-09-1241-1083/+1123
| | |
| | * Pass DynFlags down to gcWordIan Lynagh2012-09-1215-27/+30
| | |
| | * Pass DynFlags down to bWordIan Lynagh2012-09-1264-1354/+1478
| | | | | | | | | | | | | | | | | | 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.
| | * Whitespace only in codeGen/CgProf.hsIan Lynagh2012-09-111-50/+43
| | |
| | * Whitespace only in cmm/CmmUtils.hsIan Lynagh2012-09-111-77/+71
| | |
| | * Whitespace only in cmm/CmmExpr.hsIan Lynagh2012-09-111-77/+70
| | |