Skip to content

[#753] Fix/drop/comment noncanonical Show instances

requested to merge mrkun/#753-fix-show-instances into master

Description

Problem: there are many Show instances in morley that do not produce valid Haskell representations of shown terms. In particular, missing outward parens and use of Show for pretty-printing are common.

Solution: move pretty-printing into Buildable instances; make Show instances stockderived where possible; drop unnecessary Shows; reimplement necessary Shows where stock instances are impossible or unsatisfactory; comment noncanonical Shows deemed not worth the trouble with motivation for their existence and noncanonicity.

Related issue(s)

Resolves #753 (closed)

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:
    • I updated changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Edited by

Merge request reports