[Updated comments. nad**20040616110841] { hunk ./ChasingBottoms/ApproxShow.hs 22 - -- | @'approxShowsPrec' n@ works like 'showsPrec' with the following - -- differences: + -- | The 'Data' instance of 'ApproxShow' makes sure that + -- @'approxShowsPrec' n@ behaves (more or less) like the derived + -- version of 'showsPrec', with the following differences: hunk ./ChasingBottoms/ApproxShow.hs 32 + -- hunk ./ChasingBottoms/ApproxShow.hs 46 --- A generic case treating ordinary data types plus tuples and functions. --- Type specific extensions for lists and strings. --- I doubt that it's possible to have a type specific extension that --- works for all list types, though. +-- A generic case treating ordinary data types +-- Special cases (type specific extensions) for tuples, functions, +-- lists and strings. +-- I'm not sure if it's possible to have a type specific extension that +-- works for, for instance, all list types, though. I guess that it +-- would have to be monomorphic. hunk ./ChasingBottoms/ApproxShow.hs 53 --- Anyway, I don't have time improving this right now. All tests are --- OK, so this should be fine. +-- Anyway, I don't have time improving this right now. All tests go +-- through, so this should be fine. hunk ./ChasingBottoms/ApproxShow.hs 114 - -- Remove the surrounding parentheses for infix constructors. - -- No, don't do that, see the Q test case below. For - -- lists it would have been correct, though. -showCon a = showString -- . (if isInfix a then tail . init else id) - $ conString $ toConstr a +-- Some infix constructors seem to have parentheses around them in +-- their conString representations. Maybe something should be done about +-- that. See the Q test case below, and compare with ordinary lists. +showCon a = showString $ conString $ toConstr a }