| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
While I was there I removed some trailing white space
|
|
|
|
| |
Test is print025
|
| |
|
|
|
|
| |
when printing the contents of binding at a breakpoint
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
From Pepe Iborra (mnislaih)
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
| |
to avoid looping when reconstructing insufficiently evaluated, circular structures
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
It wasn't a good idea to disable it
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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?
|
|
|
|
|
| |
For more details, see test print019
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Instead, we keep the original tyvars.
The plan is to exploit type relationships among closures to recover more types.
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
| |
(RTTI is used in the :print command)
This gives a decent efficiency improvement
|
|
|
|
| |
matching
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
It now outputs "<function>" instead of showing them as thunks
|
|
|
|
|
| |
Test ghci.debugger/scripts/print018 covers this
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
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
|