[Haskell-cafe] retrospective on 'seq' -> 'unsafeSeq' ?

Simon Peyton-Jones simonpj at microsoft.com
Mon Apr 14 06:19:29 EDT 2008

| > type constraints accordingly. (Analogously there could be an unsafeShow that
| > allows showing offending values in an 'error' without adding a Show
| > constraint to the type signature.)
| Ideally, unsafeShow could also show types as they are underneath, not
| as a pretty-printing Show might show them. I have often wanted to
| overload Show to print things in a readable way, but to have a showRaw
| which shows things as they are, for debugging purposes. I have even
| written such code for Yhc:
| http://www.cs.york.ac.uk/fp/yhc/snapshot/docs/Yhc-Core-ShowRaw.html
| I think unsafeShow is a fantastic idea - and would be much more useful
| to me than unsafeSeq - plus is a non-breaking change. I think Hugs
| already has 90% of the code to support this, and GHCi's debugger I
| think has a fair chunk of it, so it could be added given not too much
| work.

Yes, as you say, the debugger has most of the machinery.  I just don't know what it'd take to make it a callable function. Pepe?

Someone might want to make a feature-request ticket for this, with as much background and/or suggested design as poss.


More information about the Haskell-Cafe mailing list