summaryrefslogtreecommitdiff
path: root/compiler/ghci/RtClosureInspect.hs
Commit message (Collapse)AuthorAgeFilesLines
...
* Use a Data.Sequence instead of a list in cvReconstructTypePepe Iborra2007-08-291-18/+22
| | | | While I was there I removed some trailing white space
* Fix a bug in RtClosureInspect.cvReconstructType.Pepe Iborra2007-08-291-1/+2
| | | | Test is print025
* Warning policePepe Iborra2007-08-291-3/+10
|
* Use a version of obtainTerm that takes a max depth boundPepe Iborra2007-08-271-15/+18
| | | | when printing the contents of binding at a breakpoint
* Type checking for type synonym familiesManuel M T Chakravarty2007-08-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces type checking for type families of which associated type synonyms are a special case. E.g. type family Sum n m type instance Sum Zero n = n type instance Sum (Succ n) m = Succ (Sum n m) where data Zero -- empty type data Succ n -- empty type In addition we support equational constraints of the form: ty1 ~ ty2 (where ty1 and ty2 are arbitrary tau types) in any context where type class constraints are already allowed, e.g. data Equals a b where Equals :: a ~ b => Equals a b The above two syntactical extensions are disabled by default. Enable with the -XTypeFamilies flag. For further documentation about the patch, see: * the master plan http://hackage.haskell.org/trac/ghc/wiki/TypeFunctions * the user-level documentation http://haskell.org/haskellwiki/GHC/Indexed_types The patch is mostly backwards compatible, except for: * Some error messages have been changed slightly. * Type checking of GADTs now requires a bit more type declarations: not only should the type of a GADT case scrutinee be given, but also that of any identifiers used in the branches and the return type. Please report any unexpected behavior and incomprehensible error message for existing code. Contributors (code and/or ideas): Tom Schrijvers Manuel Chakravarty Simon Peyton-Jones Martin Sulzmann with special thanks to Roman Leshchinskiy
* Follow Array changes (adding numElements field)Ian Lynagh2007-08-101-8/+9
|
* Fix for print022 (round up when dividing type size by word size)Ian Lynagh2007-07-141-1/+1
| | | | From Pepe Iborra (mnislaih)
* Automatic RTTI for ghci bindings Pepe Iborra2007-07-141-9/+24
| | | | | | | | | | With this patch, ghci runs rtti (bounded in the term treewith a max. depth of 10) automatically after evaluating any expression in the interactive env. In addition, a rtti step is performed on the local bindings in a breakpoint, before returning control to the user Let's see how well this works in practice
* Teach :print to not panic when the DataCon for a closure is not exposed by ↵Pepe Iborra2007-07-121-47/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | the .hi file Previously the behaviour was to panic. Now it will print an approximated representation, using the names (enclosed in keys, i.e. "<...>") and the pointed subterms. Non pointed subterms cannot be included in this representation: Prelude> let se = Data.Sequence.fromList (map Just "abc") Prelude> :eval se () Prelude> :p se se = <Data.Sequence.Deep> (<Data.Sequence.One> (_t1::t)) () (<Data.Sequence.Two> (_t2::t) (_t3::t)) Prelude> :eval _t2 () Prelude> :p se se = <Data.Sequence.Deep> (<Data.Sequence.One> (_t4::t1)) () (<Data.Sequence.Two> (Just 'b') (_t5::t1)) Prelude> This patch also includes some fixes in the pretty printer for the Term datatype
* Fix an array indexing bug in getClosureData (used by :print)Pepe Iborra2007-07-121-1/+2
|
* Fix imports & add missing type signaturesPepe Iborra2007-07-111-4/+9
|
* Add a max depth bound to the bfs implementation in cvReconstructType,Pepe Iborra2007-07-111-11/+14
| | | | to avoid looping when reconstructing insufficiently evaluated, circular structures
* Fix a bug in MatchCon, and clarify what dataConInstOrigArgTys doesLemmih2007-06-071-1/+1
| | | | | | | | | | | There was an outright bug in MatchCon.matchOneCon, in the construction of arg_tys. Easily fixed. It never showed up becuase the arg_tys are only used in WildPats, and they in turn seldom have their types looked (except by hsPatType). So I can't make a test case for htis. While I was investigating, I added a bit of clarifation and invariant-checking to dataConInstOrigArgTys and dataConInstArgTys
* Several changes to the code dealing with newtypes in :printPepe Iborra2007-06-171-83/+76
| | | | | | | | | I simplified the code, killed some unreachable blocks, and renamed it so that it corresponds more accurately with what is explained in the technical report http://www.dsic.upv.es/docs/bib-dig/informes/etd-04042007-111431/papernew2.pdf Also, fixed a bug related to newtypes in the pretty printer
* wibblePepe Iborra2007-05-241-2/+2
|
* Clean up for code conventions & add some comment Pepe Iborra2007-05-231-38/+72
|
* wibblePepe Iborra2007-05-201-1/+1
|
* Clean up & commentsPepe Iborra2007-05-201-130/+109
|
* cvReconstructType: a faster, types-only version of cvObtainTermPepe Iborra2007-05-201-11/+62
|
* Rewrite the unsafe code dealing with unboxed primitives in RtClosureInspectPepe Iborra2007-05-191-55/+51
| | | | | | | | Closure uses now a list of Words instead of a ByteArray# to store the non ptrs. Term.Prim follows this and keeps the [Word] value instead of storing the Show representation, which wasn't the best idea anyway. This fixes test print022
* add a commentSimon Marlow2007-05-161-0/+3
|
* Restore tidying up of tyvars in :printPepe Iborra2007-04-301-8/+19
| | | | | It wasn't a good idea to disable it
* Dont tidy up tyvars after :print type reconstructionPepe Iborra2007-04-261-25/+1
| | | | | | | | | | | | | I introduced a bug yesterday when I changed the way tidying up was performed. As a result of tidying, cvObtainTerm could be returning types with regular tyvars inside, which never should. But actually, it's better if we do not do the tidying up, in order to keep the tyvar names from the environment. New names will be introduced only when an existential is found, which is not so common. In this case the user will see a funny name. Is that really an issue?
* 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-251-1/+2
|
* force APs, AP_STACKs and ThunkSelectors in :forceSimon Marlow2007-04-251-2/+8
|
* unused exportsSimon Marlow2007-04-251-7/+1
|
* We no longer instantiate tyvars to Unknown types in the :print mechanismPepe Iborra2007-04-241-13/+20
| | | | | | Instead, we keep the original tyvars. The plan is to exploit type relationships among closures to recover more types.
* Haskell list syntax for the :print command Pepe Iborra2007-04-201-56/+51
| | | | | | 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
* wibblesPepe Iborra2007-04-201-4/+5
|
* add some DEBUG assertionsPepe Iborra2007-04-191-5/+6
|
* When possible, replace unification by matching in the RTTI steps Pepe Iborra2007-04-191-25/+44
| | | | | | (RTTI is used in the :print command) This gives a decent efficiency improvement
* :print command - Do not compute all the custom printers, only the first one ↵Pepe Iborra2007-04-141-6/+7
| | | | matching
* Re-working of the breakpoint supportSimon Marlow2007-04-171-29/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Constructor names in info tablesbjpop@csse.unimelb.edu.au2007-02-201-39/+0
| | | | | | | This patch adds data constructor names into their info tables. This is useful in the ghci debugger. It replaces the old scheme which was based on tracking data con names in the linker.
* Fix the behaviour of :print with functionsPepe Iborra2007-02-211-2/+3
| | | | | | | It now outputs "<function>" instead of showing them as thunks
* Fixed a bug with the :print command spotted by Bernie Pope.Pepe Iborra2007-02-161-3/+1
| | | | | Test ghci.debugger/scripts/print018 covers this
* Type reconstruction/RTTI: improve handling of newtypesPepe Iborra2007-02-071-69/+94
| | | | | | | Newtypes have always been a problem because they are not there at runtime, but we need to take them into account. Tests ghci.debugger/print011 and ghci.debugger/print012 cover this
* Comments onlyPepe Iborra2007-01-211-2/+5
|
* Fix a bug in the closure viewerPepe Iborra2007-01-201-1/+8
|
* Reorganizing my mess a bitPepe Iborra2007-01-071-8/+6
|
* Comments onlyPepe Iborra2007-01-111-5/+5
|
* Try to emulate the output of 'deriving Show' in the Term pretty printerPepe Iborra2007-01-071-2/+2
|
* Change to Unix line-line-endingssimonpj@microsoft.com2007-01-031-624/+624
|
* Fix import listsPepe Iborra2006-12-201-11/+5
|
* Replace association list in AddressEnv for a FiniteMapPepe Iborra2006-12-181-16/+13
|
* Remove uses of Data.Traversable to fix stage1 on pre ghc-6.6 systemsPepe Iborra2006-12-181-4/+2
|
* Playing with closuresPepe Iborra2006-12-101-0/+635
RtClosureInspect includes a bunch of stuff for playing with closures: - the datatype Closure is the low level representation type - the datatype Term is the high level representation type - cvObtainTerm is the main entry point, providing the Term representation of an arbitrary closure