summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* New section on debugging lambdas in the ghci user guidePepe Iborra2007-04-261-19/+105
|
* Unbreak the users_guidePepe Iborra2007-04-261-2/+2
|
* :force is not unsupported anymorePepe Iborra2007-04-261-1/+1
|
* Attach free variables rather than in-scope variables to breakpointsSimon Marlow2007-04-261-50/+98
| | | | | | | This speeds up the debugger quite a bit, we're now only about 30% slower than ordinary GHCi, and still adding breakpoints to every sub-expression. Also we now get to see the free variables in recursive bindings, which wasn't working properly before.
* getRdrNamesInScope: return interactively-bound names tooSimon Marlow2007-04-261-2/+9
| | | | so completion can now complete names of local bindings
* unused importSimon Marlow2007-04-261-1/+0
|
* Give a better error message when we try to print a value of unknown typeSimon Marlow2007-04-264-2/+16
| | | | | | | | | | | | Stopped at ../Test3.hs:(1,0)-(2,30) _result :: [a] [../Test3.hs:(1,0)-(2,30)] *Main> _result <interactive>:1:0: Ambiguous type variable `a' in the constraint: `Show a' arising from a use of `print' at <interactive>:1:0-6 Cannot resolve unkonwn runtime types: a Use :print or :force to determine these types
* Drop newtypes before computing the refinement substitution after :print type ↵Pepe Iborra2007-04-251-4/+8
| | | | reconstruction
* fix :print reconstructing too many types in environment bindingsPepe Iborra2007-04-251-13/+20
| | | | | For more details, see test print019
* Fix some corner cases in :print after the recent changesPepe Iborra2007-04-252-3/+8
|
* Update the users_guide regarding list notation in :printPepe Iborra2007-04-251-7/+3
|
* Tidy types of free vars at a breakpointSimon Marlow2007-04-253-32/+40
| | | | | Also share the code that extends the InteractiveContext between tcRnStmt and GHC.extendEnvironment.
* the Unknown types aren't required nowSimon Marlow2007-04-251-6/+1
|
* remember the type of _resultSimon Marlow2007-04-253-21/+42
|
* force APs, AP_STACKs and ThunkSelectors in :forceSimon Marlow2007-04-251-2/+8
|
* use Any as the HValue type, this should be a bit safer than forall a.aSimon Marlow2007-04-251-1/+1
|
* unused exportsSimon Marlow2007-04-251-7/+1
|
* unused importSimon Marlow2007-04-251-1/+0
|
* refactor: move pprintClosureCommand out of the GHCi monadSimon Marlow2007-04-252-16/+18
| | | | | Strictly speaking most of pprintClosureCommand should be exported by the GHC API, but this is a step in the right direction.
* Keep track of free type variables in the interactive bindingsSimon Marlow2007-04-255-39/+72
| | | | | | | | Now, the type checker won't attempt to generalise over the skolem variables in the interactive bindings. If we end up trying to show one of these types, there will be an unresolved predicate 'Show t' which causes a type error (albeit a strange one, I'll fix that later).
* Some tyvars were being introduced in the environment via the thunk bindings ↵Pepe Iborra2007-04-242-4/+13
| | | | '_ti' in :print
* When a type is refined after :print, propagate the substitution to all the ↵Pepe Iborra2007-04-242-40/+28
| | | | interactive environment
* convert type variables to TcTyVars, otherwise the typechecker gets confusedSimon Marlow2007-04-241-2/+13
|
* DebuggerTys doesn't exist any moreSimon Marlow2007-04-242-2/+0
|
* Breakpoints: get the names of the free variables rightSimon Marlow2007-04-2410-137/+171
| | | | | | | | | | | | Previously we relied on the names of the Ids attached to a tick being the same as the names of the original variables in the source code. Sometimes this worked, sometimes it didn't because the simplifier would inline away the Id. So now we do this properly and retain the original OccNames from the source code for each breakpoint, and use these to construct the new Ids when we stop. Doing this involved moving the tracking of in-scope variables from the desugarer to the coverage pass.
* We no longer instantiate tyvars to Unknown types in the :print mechanismPepe Iborra2007-04-244-140/+25
| | | | | | Instead, we keep the original tyvars. The plan is to exploit type relationships among closures to recover more types.
* remove unused importsSimon Marlow2007-04-242-4/+0
|
* add commentsSimon Marlow2007-04-241-1/+3
|
* Tweak darcs-all scriptIan Lynagh2007-04-251-1/+3
| | | | | If you got darcs by SSH without specifying a username then the script would break.
* Only haddock a package if it is buildable; spotted by Claus ReinkeIan Lynagh2007-04-251-1/+1
|
* Generating synonym instance representation tyconsManuel M T Chakravarty2007-04-258-64/+105
| | | | | | | | - Type synonym instances are turned into representation synonym tycons - They are entered into the pool of family instances (FamInst environments) in the same way as data/newtype instances - Still missing is writing the parent tycon information into ifaces and various well-formedness checks.
* Add -fwarn-monomorphism-restriction (on by default) to warn when the MR is usedsimonpj@microsoft.com2007-04-255-4/+41
| | | | | | | | Users often trip up on the Dreaded Monomorphism Restriction. This warning flag tells you when the MR springs into action. Currently it's on by default, but we could change that.
* Retain inline-pragma information on unfoldings in interface filessimonpj@microsoft.com2007-04-257-60/+104
| | | | | | | | | | | | | | | | | | | | WARNING: this patch changes interface-file formats slightly you will need to recompile your libraries Duncan Coutts wanted to export a function that has a NOINLNE pragma in a local let-defintion. This works fine within a module, but was not surviving across the interface-file serialisation. http://www.haskell.org/pipermail/glasgow-haskell-users/2007-March/012171.html Regardless of whether or not he's doing something sensible, it seems reasonable to try to retain local-binder IdInfo across interface files. This initial patch just retains inline-pragma info, on the grounds that other IdInfo can be re-inferred at the inline site. Interface files get a tiny bit bigger, but it seesm slight.
* Fix comments about data constructorssimonpj@microsoft.com2007-04-251-2/+2
|
* Give the inferred type when warning of a missing type-signature (Trac #1256)simonpj@microsoft.com2007-04-254-30/+28
|
* Make ticky work, at least partly, on 64-bit machinessimonpj@microsoft.com2007-04-242-14/+15
| | | | | | | | | | | | | | The ticky StgEntCounter structure was trying to be clever by using a fixed-width 32-bit field for the registeredp value. But the code generators are not up to handling structures packed tightly like this (on a 64-bit architecture); result seg-fault on 64-bit. Really there should be some complaint from the code generators, not simply a seg fault. Anyway I switched to using native words for StgEntCounter fields, and now at least it works.
* Add WAY_debug_t_NAME and WAY_debug_t_HC_OPTSsimonpj@microsoft.com2007-04-241-0/+4
|
* Fix bug in boxySplitTyConAppsimonpj@microsoft.com2007-04-241-2/+6
| | | | | | | | | | Merge to STABLE branch This bug was discovered by Nicolas Frisby. It's an egregious missing guard in boxySplitTyConApp. Test is tcfail180
* revert previous fix until I can find out why it was wrongSimon Marlow2007-04-231-1/+1
| | | | should fix recent GHCi problems in the HEAD
* Fixes to datacon wrappers for indexed data typessimonpj@microsoft.com2007-04-228-150/+225
| | | | | | | | | | | | | | | | | nominolo@gmail.com pointed out (Trac #1204) that indexed data types aren't quite right. I investigated and found that the wrapper functions for indexed data types, generated in MkId, are really very confusing. In particular, we'd like these combinations to work newtype + indexed data type GADT + indexted data type The wrapper situation gets a bit complicated! I did a bit of refactoring, and improved matters, I think. I am not certain that I have gotten it right yet, but I think it's better. I'm committing it now becuase it's been on my non-backed-up laptop for a month and I want to get it into the repo. I don't think I've broken anything, but I don't regard it as 'done'.
* Part 2 of: Fix corner case of useless constraint in SPECIALISE pragmasimonpj@microsoft.com2007-04-221-6/+9
| | | | | | | | | MERGE TO STABLE I forgot to include this in the previous patch and Darcs crashes if I try 'amend-record' or 'unrecord' because I have a partial repo. Sigh.
* Fix corner case of useless constraint in SPECIALISE pragmasimonpj@microsoft.com2007-04-225-70/+100
| | | | | | | | | | | | | MERGE TO STABLE This patch fixes Trac #1287. The problem is described in Note [Unused spec binders] in DsBinds. At the same time I realised that the error messages in DsBinds.dsPrag were being given the location of the *binding* not the *pragma*. So I've fixed that too.
* Warning policesimonpj@microsoft.com2007-04-221-0/+2
|
* Put the default value for -dppr-user-length in the manualsimonpj@microsoft.com2007-04-221-1/+1
| | | | | | | MERGE TO STABLE Incidentally, this flag should probably be renamed -dppr-user-depth
* Improve depth-cutoff for printing HsSyn in error messagessimonpj@microsoft.com2007-04-222-15/+33
| | | | | | | | | | | | | | | | | | MERGE TO STABLE The "user style" in Outputable allows us to elide large expressions when printing HsSyn, printing "..." instead. This is done by calling Outputable.pprDeeper. But there was no mechanism for trimming very long lists, which occur when using do-notation or explicit lists. This patch fixes the problem, by adding Outputable.pprDeeperList. I also made some of the pretty-printing in HsExpr rather more vigorous about increasing the depth; in particular, pprParendExpr. This should make debug prints shorter.
* Comments only (concerning rewrite rules)simonpj@microsoft.com2007-04-221-1/+6
|
* Fix the GHC.Base.inline builtin rulesimonpj@microsoft.com2007-04-203-6/+35
| | | | | | | | | | The BuiltIn rule for GHC.Base.inline wasn't working for two reasons: a) inlineIdName wasn't in basicKnownKeyNames b) The rule function wasn't taking into account the type argument Thanks to Brian Alliet for spotting this bug.
* Haskell list syntax for the :print command Pepe Iborra2007-04-202-61/+58
| | | | | | I did quite a bit of clean up in the Term pretty printer code too. Support for infix constructors is still on the TODO list
* Outputable.cparenPepe Iborra2007-04-202-2/+6
|
* wibblesPepe Iborra2007-04-201-4/+5
|