- 11 Feb, 2014 2 commits
-
-
Joachim Breitner authored
such as that of coerce.
-
Joachim Breitner authored
just like boxed type equalities.
-
- 26 Jan, 2014 1 commit
-
-
Gabor Greif authored
-
- 08 Oct, 2013 1 commit
-
-
Gabor Greif authored
-
- 01 Oct, 2013 1 commit
-
-
Simon Marlow authored
-
- 29 Aug, 2013 1 commit
-
-
nfrisby authored
cf http://ghc.haskell.org/trac/ghc/wiki/LateDmd
-
- 02 Aug, 2013 1 commit
-
-
eir@cis.upenn.edu authored
Roles are a solution to the GeneralizedNewtypeDeriving type-safety problem. Roles were first described in the "Generative type abstraction" paper, by Stephanie Weirich, Dimitrios Vytiniotis, Simon PJ, and Steve Zdancewic. The implementation is a little different than that paper. For a quick primer, check out Note [Roles] in Coercion. Also see http://ghc.haskell.org/trac/ghc/wiki/Roles and http://ghc.haskell.org/trac/ghc/wiki/RolesImplementation For a more formal treatment, check out docs/core-spec/core-spec.pdf. This fixes Trac #1496, #4846, #7148.
-
- 30 May, 2013 1 commit
-
-
Simon Peyton Jones authored
This is a long-standing regression (Trac #7797), which meant that in particular the Eq [Char] instance does not get specialised. (The *methods* do, but the dictionary itself doesn't.) So when you call a function f :: Eq a => blah on a string type (ie a=[Char]), 7.6 passes a dictionary of un-specialised methods. This only matters when calling an overloaded function from a specialised context, but that does matter in some programs. I remember (though I cannot find the details) that Nick Frisby discovered this to be the source of some pretty solid performanc regresisons. Anyway it works now. The key change is that a DFunUnfolding now takes a form that is both simpler than before (the DFunArg type is eliminated) and more general: data Unfolding = ... | DFunUnfolding { -- The Unfolding of a DFunId -- See Note [DFun unfoldings] -- df = /\a1..am. \d1..dn. MkD t1 .. tk -- (op1 a1..am d1..dn) -- (op2 a1..am d1..dn) df_bndrs :: [Var], -- The bound variables [a1..m],[d1..dn] df_con :: DataCon, -- The dictionary data constructor (never a newtype datacon) df_args :: [CoreExpr] -- Args of the data con: types, superclasses and methods, } -- in positional order That in turn allowed me to re-enable the DFunUnfolding specialisation in DsBinds. Lots of details here in TcInstDcls: Note [SPECIALISE instance pragmas] I also did some refactoring, in particular to pass the InScopeSet to exprIsConApp_maybe (which in turn means it has to go to a RuleFun). NB: Interface file format has changed!
-
- 10 May, 2013 1 commit
-
-
ian@well-typed.com authored
-
- 04 Feb, 2013 1 commit
-
-
chak@cse.unsw.edu.au. authored
* We need to keep the vectorised version of a variable alive while the original is alive. * This implies that the vectorised version needs to get into the iface if the original appears in an unfolding.
-
- 30 Jan, 2013 1 commit
-
-
Gabor Greif authored
-
- 02 Jan, 2013 1 commit
-
-
Simon Peyton Jones authored
I was tracking down an error looking like Prelude.(!!): index too large which is very unhelpful. This patch replaces at least some uses of (!!) in GHC with getNth, which has a more helpful error message (with DEBUG anyway)
-
- 01 Jan, 2013 1 commit
-
-
Simon Peyton Jones authored
We now have the invariant for a ClsInst that the is_tvs field is always completely fresh type variables. See Note [Template tyvars are fresh] in InstEnv. (Previously we frehened them when extending the instance environment, but that seems messier because it was an invariant only when the ClsInst was in an InstEnv. Moreover, there was an invariant that thet tyvars of the DFunid in the ClsInst had to match, and I have removed that invariant altogether; there is no need for it.) Other changes I made at the same time: * Make is_tvs into a *list*, in the right order for the dfun type arguments. This removes the wierd need for the dfun to have the same tyvars as the ClsInst template, an invariant I have always hated. The cost is that we need to make it a VarSet when matching. We could cache an is_tv_set instead. * Add a cached is_cls field to the ClsInst, to save fishing the Class out of the DFun. (Renamed is_cls to is_cls_nm.) * Make tcSplitDFunTy return the dfun args, not just the *number* of dfun args * Make InstEnv.instanceHead return just the *head* of the instance declaration. Add instanceSig to return the whole thing.
-
- 05 Dec, 2012 1 commit
-
-
chak@cse.unsw.edu.au. authored
* Vectorisation avoidance is now the default * Types and values from unvectorised modules are permitted in scalar code * Simplified the VECTORISE pragmas (see http://hackage.haskell.org/trac/ghc/wiki/DataParallel/VectPragma for the spec) * Vectorisation information is now included in the annotated Core AST
-
- 18 Oct, 2012 1 commit
-
-
ian@well-typed.com authored
We were being inconsistent about how we tested whether dump flags were enabled; in particular, sometimes we also checked the verbosity, and sometimes we didn't. This lead to oddities such as "ghc -v4" printing an "Asm code" section which didn't contain any code, and "-v4" enabled some parts of "-ddump-deriv" but not others. Now all the tests use dopt, which also takes the verbosity into account as appropriate.
-
- 16 Oct, 2012 1 commit
-
-
ian@well-typed.com authored
This avoids confusion due to [DynFlag] and DynFlags being completely different types.
-
- 27 Jun, 2012 1 commit
-
-
Silent superclass parameters solve the problem that the superclasses of a dicionary construction can easily turn out to be (wrongly) bottom. The problem and solution are described in Note [Silent superclass arguments] in TcInstDcls I first implemented this fix (with Dimitrios) in Dec 2010, but removed it again in Jun 2011 becuase we thought it wasn't necessary any more. (The reason we thought it wasn't necessary is that we'd stopped generating derived superclass constraints for *wanteds*. But we were wrong; that didn't solve the superclass-loop problem.) So we have to re-implement it. It's not hard. Main features: * The IdDetails for a DFunId says how many silent arguments it has * A DFunUnfolding describes which dictionary args are just parameters (DFunLamArg) and which are a function to apply to the parameters (DFunPolyArg). This adds the DFunArg type to CoreSyn * Consequential changes to IfaceSyn. (Binary hi file format changes slightly.) * TcInstDcls changes to generate the right dfuns * CoreSubst.exprIsConApp_maybe handles the new DFunUnfolding The thing taht is *not* done yet is to alter the vectoriser to pass the relevant extra argument when building a PA dictionary.
-
- 29 Nov, 2011 1 commit
-
-
Simon Peyton Jones authored
This is a vital wibble to: f7cf3dcd * Be a bit less gung-ho in exprIsConApp_maybe
-
- 27 Nov, 2011 1 commit
-
-
Simon Peyton Jones authored
In particular, don't second-guess callSiteInline by effectively inlining function call. This eliminates the "Interesting!" debug messages we've been getting. I concluded they weren't interesting enough to account for the extra complexity!
-
- 25 Nov, 2011 1 commit
-
-
chak@cse.unsw.edu.au. authored
* Correct usage of new type wrappers from MkId * 'VECTORISE [SCALAR] type T = S' didn't work correctly across module boundaries * Clean up 'VECTORISE SCALAR instance'
-
- 16 Nov, 2011 1 commit
-
-
dimitris authored
-
- 04 Nov, 2011 1 commit
-
-
Ian Lynagh authored
We only use it for "compiler" sources, i.e. not for libraries. Many modules have a -fno-warn-tabs kludge for now.
-
- 02 Nov, 2011 1 commit
-
-
Simon Marlow authored
User visible changes ==================== Profilng -------- Flags renamed (the old ones are still accepted for now): OLD NEW --------- ------------ -auto-all -fprof-auto -auto -fprof-exported -caf-all -fprof-cafs New flags: -fprof-auto Annotates all bindings (not just top-level ones) with SCCs -fprof-top Annotates just top-level bindings with SCCs -fprof-exported Annotates just exported bindings with SCCs -fprof-no-count-entries Do not maintain entry counts when profiling (can make profiled code go faster; useful with heap profiling where entry counts are not used) Cost-centre stacks have a new semantics, which should in most cases result in more useful and intuitive profiles. If you find this not to be the case, please let me know. This is the area where I have been experimenting most, and the current solution is probably not the final version, however it does address all the outstanding bugs and seems to be better than GHC 7.2. Stack traces ------------ +RTS -xc now gives more information. If the exception originates from a CAF (as is common, because GHC tends to lift exceptions out to the top-level), then the RTS walks up the stack and reports the stack in the enclosing update frame(s). Result: +RTS -xc is much more useful now - but you still have to compile for profiling to get it. I've played around a little with adding 'head []' to GHC itself, and +RTS -xc does pinpoint the problem quite accurately. I plan to add more facilities for stack tracing (e.g. in GHCi) in the future. Coverage (HPC) -------------- * derived instances are now coloured yellow if they weren't used * likewise record field names * entry counts are more accurate (hpc --fun-entry-count) * tab width is now correct (markup was previously off in source with tabs) Internal changes ================ In Core, the Note constructor has been replaced by Tick (Tickish b) (Expr b) which is used to represent all the kinds of source annotation we support: profiling SCCs, HPC ticks, and GHCi breakpoints. Depending on the properties of the Tickish, different transformations apply to Tick. See CoreUtils.mkTick for details. Tickets ======= This commit closes the following tickets, test cases to follow: - Close #2552: not a bug, but the behaviour is now more intuitive (test is T2552) - Close #680 (test is T680) - Close #1531 (test is result001) - Close #949 (test is T949) - Close #2466: test case has bitrotted (doesn't compile against current version of vector-space package)
-
- 31 Oct, 2011 1 commit
-
-
chak@cse.unsw.edu.au. authored
* Frontend support (not yet used in the vectoriser)
-
- 24 Oct, 2011 1 commit
-
-
Simon Peyton Jones authored
This is important for Integer literals; fixes Trac #5576
-
- 23 Oct, 2011 1 commit
-
-
Ian Lynagh authored
Assertions already get optimised away if DEBUG is off
-
- 10 Oct, 2011 1 commit
-
-
chak@cse.unsw.edu.au. authored
-
- 23 Sep, 2011 1 commit
-
-
Simon Peyton Jones authored
and comment its invariants in Note [CoreProgram] in CoreSyn I'm not totally convinced that CoreProgram is the right name (perhaps CoreTopBinds might better), but it is useful to have a clue that you are looking at the top-level bindings. This is only a matter of a type synonym change; no deep refactoring here.
-
- 09 Sep, 2011 2 commits
-
-
batterseapower authored
Move exprIsConApp_maybe to CoreSubst so we can use it in VSO. Fix VSO bug with unlifted let bindings.
-
Simon Peyton Jones authored
-
- 06 Sep, 2011 2 commits
-
-
batterseapower authored
Basically as documented in http://hackage.haskell.org/trac/ghc/wiki/KindFact, this patch adds a new kind Constraint such that: Show :: * -> Constraint (?x::Int) :: Constraint (Int ~ a) :: Constraint And you can write *any* type with kind Constraint to the left of (=>): even if that type is a type synonym, type variable, indexed type or so on. The following (somewhat related) changes are also made: 1. We now box equality evidence. This is required because we want to give (Int ~ a) the *lifted* kind Constraint 2. For similar reasons, implicit parameters can now only be of a lifted kind. (?x::Int#) => ty is now ruled out 3. Implicit parameter constraints are now allowed in superclasses and instance contexts (this just falls out as OK with the new constraint solver) Internally the following major changes were made: 1. There is now no PredTy in the Type data type. Instead GHC checks the kind of a type to figure out if it is a predicate 2. There is now no AClass TyThing: we represent classes as TyThings just as a ATyCon (classes had TyCons anyway) 3. What used to be (~) is now pretty-printed as (~#). The box constructor EqBox :: (a ~# b) -> (a ~ b) 4. The type LCoercion is used internally in the constraint solver and type checker to represent coercions with free variables of type (a ~ b) rather than (a ~# b)
-
batterseapower authored
Conflicts: compiler/simplCore/SetLevels.lhs
-
- 18 Aug, 2011 1 commit
-
-
chak@cse.unsw.edu.au. authored
- Pragma to determine how a given type is vectorised - At this stage only the VECTORISE SCALAR variant is used by the vectoriser. - '{-# VECTORISE SCALAR type t #-}' implies that 't' cannot contain parallel arrays and may be used in vectorised code. However, its constructors can only be used in scalar code. We use this, e.g., for 'Int'. - May be used on imported types See also http://hackage.haskell.org/trac/ghc/wiki/DataParallel/VectPragma
-
- 27 Jul, 2011 1 commit
-
-
Simon Peyton Jones authored
-
- 23 Jul, 2011 1 commit
-
-
Simon Peyton Jones authored
A "lifting substitition" takes a *type* to a *coercion*, using a substitution that takes a *type variable* to a *coercion*. We were using a CvSubst for this purpose, which was an awkward exception: in every other use of CvSubst, type variables map only to types. Turned out that Coercion.liftCoSubst is quite a small function, so I rewrote it with a special substitution type Coercion.LiftCoSubst, just for that purpose. In doing so I found that the function itself was bizarrely over-complicated ... a direct result of mis-using CvSubst. So this patch makes it all simpler, faster, and easier to understand. No bugs fixed though!
-
- 21 Jul, 2011 1 commit
-
-
Simon Peyton Jones authored
I realised that my recently-added cunning stuff about RULES for imported Ids was simply wrong, so this patch removes it. See Note [Rules for imported functions], which explains it all. This patch also does quite a bit of refactoring in the treatment of loop breakers.
-
- 30 Jun, 2011 2 commits
-
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
When floating a case outwards we must be careful to clone the binders, since their scope is widening. Plus lots of tidying up.
-
- 29 Jun, 2011 1 commit
-
-
batterseapower authored
-
- 23 Jun, 2011 1 commit
-
-
Simon Peyton Jones authored
This type was mainly there to support silent superclass parameters for dfuns, and they have gone away. So this patch is another minor simplification. (Interface format change; you need to make clean.)
-