- 17 Apr, 2007 2 commits
-
-
Simon Marlow authored
-
Simon Marlow authored
This is the result of Bernie Pope's internship work at MSR Cambridge, with some subsequent improvements by me. The main plan was to (a) Reduce the overhead for breakpoints, so we could enable the feature by default without incurrent a significant penalty (b) Scatter more breakpoint sites throughout the code Currently we can set a breakpoint on almost any subexpression, and the overhead is around 1.5x slower than normal GHCi. I hope to be able to get this down further and/or allow breakpoints to be turned off. This patch also fixes up :print following the recent changes to constructor info tables. (most of the :print tests now pass) We now support single-stepping, which just enables all breakpoints. :step <expr> executes <expr> with single-stepping turned on :step single-steps from the current breakpoint The mechanism is quite different to the previous implementation. We share code with the HPC (haskell program coverage) implementation now. The coverage pass annotates source code with "tick" locations which are tracked by the coverage tool. In GHCi, each "tick" becomes a potential breakpoint location. Previously breakpoints were compiled into code that magically invoked a nested instance of GHCi. Now, a breakpoint causes the current thread to block and control is returned to GHCi. See the wiki page for more details and the current ToDo list: http://hackage.haskell.org/trac/ghc/wiki/NewGhciDebugger
-
- 16 Apr, 2007 1 commit
-
-
Ian Lynagh authored
-
- 11 Apr, 2007 1 commit
-
-
Simon Marlow authored
This patch cleans up the GHC API, and adds some functionality: we can now compile to object code inside GHCi. Previously we had: data GhcMode = BatchCompile | Interactive | OneShot | JustTypecheck | MkDepend data HscTarget = HscC | HscAsm | HscJava | HscInterpreted | HscNothing There was redundancy here; if GhcMode is Interactive, then only HscInterpreted makes sense, and JustTypecheck required HscNothing. Now we have: data GhcMode = CompManager -- ^ --make, GHCi, etc. | OneShot -- ^ ghc -c Foo.hs | MkDepend -- ^ ghc -M, see Finder for why we need this and HscTarget remains as before. Previously GhcLink looked like this: data GhcLink = NoLink | StaticLink Now we have: data GhcLink = NoLink | LinkBinary | LinkInMemory The idea being that you can have an HscTarget of HscAsm (for example) and still link in memory. There are two new flags: -fobject-code selects object code as the target (selects either -fasm or -fvia-C, whichever is the default) This can be usd with ':set' in GHCi, or on the command line. -fbyte-code sets byte-code as the target. Only works in GHCi. One day maybe this could save the byte code in a file when used outside GHCi. (names chosen for consistency with -fno-code). Changes to the GHC API: newSession no longer takes the GhcMode argument. The GhcMode defaults to CompManager, which is usually what you want. To do JustTypecheck now, just set hscTarget to HscNothing.
-
- 02 Apr, 2007 1 commit
-
-
chak@cse.unsw.edu.au. authored
** MERGE into 6.6.1 **
-
- 30 Mar, 2007 1 commit
-
-
simonpj@microsoft.com authored
MERGE to 6.6.1 For class-ops, record selectors, data constructors, we want the ru_local field of the Rule to be False. We do not attach the rule to the binding for the Id, because there simply isn't a binding until the code gen stage. (NB: the ru_local field is different to the orphan-hood of the rule.) This fixes a bug that meant that RULES on class ops were never exported.
-
- 23 Mar, 2007 1 commit
-
-
simonpj@microsoft.com authored
-
- 16 Mar, 2007 1 commit
-
-
simonpj@microsoft.com authored
Merge to 6.6 branch. Test case is dsrun014. Note [Desugaring seq] cf Trac #1031 ~~~~~~~~~~~~~~~~~~~~~ f x y = x `seq` (y `seq` (# x,y #)) The [CoreSyn let/app invariant] means that, other things being equal, because the argument to the outer 'seq' has an unlifted type, we'll use call-by-value thus: f x y = case (y `seq` (# x,y #)) of v -> x `seq` v But that is bad for two reasons: (a) we now evaluate y before x, and (b) we can't bind v to an unboxed pair Seq is very, very special! So we recognise it right here, and desugar to case x of _ -> case y of _ -> (# x,y #) The special case would be valid for all calls to 'seq', but it's only *necessary* for ones whose second argument has an unlifted type. So we only catch the latter case here, to avoid unnecessary tests.
-
- 23 Feb, 2007 1 commit
-
-
mnislaih authored
-
- 22 Feb, 2007 1 commit
-
-
mnislaih authored
My previous patch was creating problems with hs-boot files.
-
- 11 Jan, 2007 1 commit
-
-
Simon Marlow authored
-
- 21 Feb, 2007 2 commits
-
-
mnislaih authored
This patch performs several optimizations with the goal of minimizing the cost of building the arguments to breakpointJump: - Group them all in a single tuple, to minimize closure creation in heap - Wrap this with the GHC.Base.lazy combinator, to induce max laziness - Remove as many literal strings as possible * injecting a module-local CAF to store the module name and use that * eliminating the package string (not needed).
-
simonpj@microsoft.com authored
Conal Eliott (Trac #1145) exposed a nasty flaw in the way in which orphan instances are computed, when there are functional dependencies in the class. It took me some time to figure out what was going on, and led to more refactoring. Briefly: * Elaborate comments about orphan-hood and versioning added to IfaceSyn * The is_orph field vanishes from InstEnv.Instance * Similarly ru_orph vanishes from CoreSyn.CoreRule * Orphan-hood is computed in MkIface.instanceToIfaceInst, and MkIface.coreRuleToIfaceRule Elsewhere just tidying up.
-
- 13 Feb, 2007 1 commit
-
-
mnislaih authored
Benchmarks have shown that making the formation of the list of locals more lazy can improve performance of -fdebugging up to 50% in some cases
-
- 05 Feb, 2007 1 commit
-
-
simonpj@microsoft.com authored
This patch clears up a long-standing wart. For some time it's been the case that the RHS of a non-recursive let can be unlifed iff the RHS is ok-for-speculation This patch extends the invariant to the argument of an App, and establishes it by the smart constructors mkDsApp, mkDsApps in the desugarer. Once established, it should be maintained by the optimiser. This tides up some awkward cases, notably in exprIsHNF, and I think it fixes a outright strictness bug in Simplify.prepareRhs.
-
- 04 Feb, 2007 1 commit
-
-
lennart@augustsson.net authored
-
- 02 Feb, 2007 3 commits
-
-
mnislaih authored
By popular request, in a breakpoint it is possible now to inspect the result of the expression wrapped by the breakpoint. The user interface for this is right now preliminar; there is a new binding called '_result' at every breakpoint. Suggestions are welcome!
-
mnislaih authored
-
mnislaih authored
-
- 31 Jan, 2007 1 commit
-
-
mnislaih authored
I have added a check, and while there removed a few kludges in my code. Kudos to -dcore-lint for uncovering this. I think that this restriction could be lifted, if GHC.Base.breakpoint could have kind ?? -> ??. But is this a legal type? Does not look so to me.
-
- 21 Dec, 2006 1 commit
-
-
lennart@augustsson.net authored
The class is named IsString with the single method fromString. Overloaded strings work the same way as overloaded numeric literals. In expressions a string literals gets a fromString applied to it. In a pattern there will be an equality comparison with the fromString:ed literal. Use -foverloaded-strings to enable this extension.
-
- 21 Jan, 2007 1 commit
-
-
mnislaih authored
-
- 07 Jan, 2007 1 commit
-
-
mnislaih authored
-
- 11 Jan, 2007 2 commits
-
-
mnislaih authored
-
simonpj@microsoft.com authored
Consider this FC program: data family AT a :: * data instance AT Int = T1 Int Int f :: AT Int -> Int f t = case t of DEFAULT -> <body> We'd like to replace the DEFAULT by a use of T1, so that if we scrutinise t inside <body> we share the evaluation: f t = case (t `cast` co) of T1 x y -> <body> I decided to do this as part of the liberate-case transformation, which is already trying to avoid redundant evals. The new transformation requires knowledge of the family instance environment, so I had to extend ModGuts to carry the fam_inst_env, and put that envt into the liberate-case environment. Otherwise it's all pretty straightforward.
-
- 29 Dec, 2006 1 commit
-
-
andy@galois.com authored
Adding a {-# GENERATED "SourceFile" SourceSpan #-} <expr> pragma. This will be used to generate coverage for tool generated (or quoted) code. The pragma states the the expression was generated/quoted from the stated source file and source span.
-
- 28 Dec, 2006 1 commit
-
-
chak@cse.unsw.edu.au. authored
- With -findexed-types, equational constraints can appear in contexts wherever class predicates are allowed. - The two argument types need to be boxed and rank 0.
-
- 22 Dec, 2006 1 commit
-
-
mnislaih authored
Hopefully this will help to restore ability to build HEAD on GHC 5.0x systems
-
- 20 Dec, 2006 1 commit
-
-
mnislaih authored
-
- 11 Dec, 2006 2 commits
- 10 Dec, 2006 3 commits
-
-
mnislaih authored
Used in the desugaring of the breakpoint primitive
-
mnislaih authored
Instrumentation gets activated by the '-fdebugging' dynflag. All the instrumentation occurrs in the desugarer; it consists of inserting 'breakpoint' combinators at a number of places in the AST, namely: - Binding sites - Do-notation statements These 'breakpoint' combinators will later be further desugared (at DsExpr) into ___Jump functions. For more info about this and all the ghci.debugger see the page at the GHC wiki: http://hackage.haskell.org/trac/ghc/wiki/GhciDebugger
-
mnislaih authored
-
- 13 Dec, 2006 1 commit
-
-
andy@galois.com authored
-
- 09 Dec, 2006 1 commit
-
-
andy@galois.com authored
-
- 29 Nov, 2006 1 commit
-
-
andy@galois.com authored
This changes the internal representation of TickBoxes, from Note (TickBox "module" n) <expr> into case tick<module,n> of _ -> <expr> tick has type :: #State #World, when the module and tick numbe are stored inside IdInfo. Binary tick boxes change from Note (BinaryTickBox "module" t f) <expr> into btick<module,t,f> <expr> btick has type :: Bool -> Bool, with the module and tick number stored inside IdInfo.
-
- 01 Nov, 2006 1 commit
-
-
andy@galois.com authored
-
- 21 Nov, 2006 1 commit
-
-
Simon Marlow authored
-
- 25 Oct, 2006 1 commit
-
-
andy@galois.com authored
-