- 06 Nov, 2012 4 commits
-
-
Simon Peyton Jones authored
Consider Work item: k ~ * Inert item: (a::k) ~ Int Then we must kick out the inert item! We weren't doing that, something I discovered when fixing Trac #7384. Discussed with Dimitrios, and we wrote a long comment Note [Delicate equality kick-out] to explain.
-
Simon Peyton Jones authored
I think I accidentally introduced this bug a month ago when refactoring. It's a bit non-obvious, but since Derived constraints have no evidence, we mustn't be strict in it. Now there's a big comment to prevent this bug happening again. This fixes Trac #7384.
-
Simon Peyton Jones authored
This bug caused Trac #7386, because in the (rather tricky) "type inference" (aka run time type reconstruction) done by the GHCi debugger, we were failing to instantiate a data type family correctly. When that code was written we didn't *have* data families. I wrote Note [Constructor arg types] to explain the new scheme.
-
Simon Peyton Jones authored
-
- 05 Nov, 2012 2 commits
-
-
Simon Marlow authored
-
Simon Marlow authored
-
- 02 Nov, 2012 11 commits
-
-
ian@well-typed.com authored
There's no need to have the uniq in the rule, but its presence can cause spurious ABI changes.
-
ian@well-typed.com authored
-
ian@well-typed.com authored
-
ian@well-typed.com authored
There are no longer any GLOBAL_VARs in main/DriverMkDepend.hs.
-
ian@well-typed.com authored
We now do the initial dependency generation for the vanilla way regardless of what way flags and hisuf/osuf flags are given. This makes it easier to generate the right dependency info in the end.
-
ian@well-typed.com authored
-
ian@well-typed.com authored
-
ian@well-typed.com authored
-
ian@well-typed.com authored
These names end up in the ABI, and hence part of the ABI hash. We don't want uniques in them so that we don't get spurious ABI hash changes.
-
ian@well-typed.com authored
-
ian@well-typed.com authored
The wrapper functions can end up in interface files, and thus are part of the ABI hash. But uniqs easily change for no good reason when recompiling, which can lead to an ABI hash needlessly changing.
-
- 01 Nov, 2012 5 commits
-
-
ian@well-typed.com authored
We don't want to narrow the argument size before making the foreign call: Word8 still gets passed as a Word-sized argument
-
ian@well-typed.com authored
-
ian@well-typed.com authored
-
Simon Marlow authored
-
ian@well-typed.com authored
-
- 31 Oct, 2012 3 commits
-
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
Without -XImpredicativeTypes, the typing rules say that a function should be instantiated only at a *monotype*. In implementation terms, that means that a unification variable should not unify with a type involving foralls. But we were not enforcing that rule, and that gave rise to some confusing error messages, such as Trac #7264, #6069 This patch adds the test for foralls. There are consequences * I put the test in occurCheckExpand, since that is where we see if a type can unify with a given unification variable. So occurCheckExpand has to get DynFlags, so it can test for -XImpredicativeTypes * We want this to work foo :: (forall a. a -> a) -> Int foo = error "foo" But that means instantiating error at a polytype! But error is special already because you can instantiate it at an unboxed type like Int#. So I extended the specialness to allow type variables of openTypeKind to unify with polytypes, regardless of -XImpredicativeTypes. Conveniently, this works in TcUnify.matchExpectedFunTys, which generates unification variable for the function arguments, which can be polymorphic. * GHC has a special typing rule for ($) (see Note [Typing rule for ($)] in TcExpr). It unifies the argument and result with a unification variable to exclude unboxed types -- but that means I now need a kind of unificatdion variable that *can* unify with a polytype. So for this sole case I added PolyTv to the data type TcType.MetaInfo. I suspect we'll find mor uses for this, and the changes are tiny, but it still feel a bit of a hack. Well the special rule for ($) is a hack! There were some consequential changes in error reporting (TcErrors).
-
Simon Peyton Jones authored
-
- 30 Oct, 2012 7 commits
-
-
gmainlan@microsoft.com authored
With the new register allocation scheme, the LLVM back end must always use liveness information.
-
gmainlan@microsoft.com authored
We now have accurate global register liveness information attached to all Cmm procedures and jumps. With this patch, the LLVM back end uses this information to pass only the live floating point (F and D) registers on tail calls. This makes the LLVM back end compatible with the new register allocation strategy. Ideally the GHC LLVM calling convention would put all registers that are always live first in the parameter sequence. Unfortunately the specification is written so that on x86-64 SpLim (always live) is passed after the R registers. Therefore we must always pass *something* in the R registers, so we pass the LLVM value undef.
-
gmainlan@microsoft.com authored
On x86-64 F and D registers are both drawn from SSE registers, so there is no reason not to draw them from the same pool of available SSE registers. This means that whereas previously a function could only receive two Double arguments in registers even if it did not have any Float arguments, now it can receive up to 6 arguments that are any mix of Float and Double in registers. This patch breaks the LLVM back end. The next patch will fix this breakage.
-
gmainlan@microsoft.com authored
All Cmm procedures now include the set of global registers that are live on procedure entry, i.e., the global registers used to pass arguments to the procedure. Only global registers that are use to pass arguments are included in this list.
-
gmainlan@microsoft.com authored
We would like to calculate register liveness for global registers as well as local registers, so this patch generalizes the existing infrastructure to set the stage.
-
gmainlan@microsoft.com authored
Jumps now always have live register information attached, so drop Maybes.
-
Simon Marlow authored
Fixes this, when building unregisterised: rts/dist/build/AutoApply.hc:87:1: error: ‘stg_ap_v_entry’ undeclared (first use in this function)
-
- 29 Oct, 2012 2 commits
-
-
Simon Peyton Jones authored
Occurrences in terms are uses, in patterns they are not. In this way we get unused-constructor warnings from modules like this module M( f, g, T ) where data T = T1 | T2 Bool f x = T2 x g T1 = True g (T2 x) = x Here a T1 value cannot be constructed, so we can warn. The use in a pattern doesn't count. See Note [Patterns are not uses] in RnPat. Interestingly this change exposed three module in GHC itself that had unused constructors, which I duly removed: * ghc/Main.hs * compiler/ghci/ByteCodeAsm * compiler/nativeGen/PPC/RegInfo Their changes are in this patch.
-
Simon Peyton Jones authored
-
- 26 Oct, 2012 4 commits
-
-
Simon Peyton Jones authored
There was a long thread on cvs-ghc which concluded that although it's the Right Thing to deprecate Rank2Types and PolymorphicComponents, in favour of RankNTypes, it would cause lots of busy-work for library authors and the pain isn't worth the gain. So this patch removes the deprecation, and documents the synonym-ity.
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
-
- 25 Oct, 2012 2 commits
-
-
Simon Marlow authored
-
Simon Marlow authored
-