Teach :print to follow references (STRefs and IORefs)
authorPepe Iborra <mnislaih@gmail.com>
Tue, 4 Dec 2007 10:55:11 +0000 (10:55 +0000)
committerPepe Iborra <mnislaih@gmail.com>
Tue, 4 Dec 2007 10:55:11 +0000 (10:55 +0000)
commitf4d6209d11ba41d3bfdd7e14e9859b890915abdb
tree44c31ce7bd00162d09eb2186d3573ad98b289d9b
parent7f474b779449109760d133eef5aba0aa3c38474a
Teach :print to follow references (STRefs and IORefs)

Prelude Data.IORef> :p l
l = (_t4::Maybe Integer) : (_t5::[Maybe Integer])
Prelude Data.IORef> p <- newIORef l
Prelude Data.IORef> :p p
p = GHC.IOBase.IORef (GHC.STRef.STRef {((_t6::Maybe Integer) :
                                        (_t7::[Maybe Integer]))})
Prelude Data.IORef> :sp p
p = GHC.IOBase.IORef (GHC.STRef.STRef {(_ : _)})

I used braces to denote the contents of a reference.
Perhaps there is a more appropriate notation?
compiler/ghci/Debugger.hs
compiler/ghci/RtClosureInspect.hs