• mnislaih's avatar
    Teach :print to not panic when the DataCon for a closure is not exposed by the .hi file · 876db7ed
    mnislaih authored
    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
    
    876db7ed
Debugger.hs 8.96 KB