Teach :print to not panic when the DataCon for a closure is not exposed by the .hi...
authorPepe Iborra <mnislaih@gmail.com>
Thu, 12 Jul 2007 17:43:23 +0000 (17:43 +0000)
committerPepe Iborra <mnislaih@gmail.com>
Thu, 12 Jul 2007 17:43:23 +0000 (17:43 +0000)
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


No differences found