Add Eq, Ord, Show, and Read instances for Const
ClosedPublic

Authored by hvr on Jan 14 2015, 6:45 AM.

Details

Summary

As suggested in

https://www.haskell.org/pipermail/libraries/2013-October/021531.html

this adds the following instances

  • Show a => Show (Const a b)
  • Read a => Read (Const a b)
  • Eq a => Eq (Const a b)
  • Ord a => Ord (Const a b)

The Read/Show instances are defined in such a way as if Const was defined
without record-syntax (i.e. as newtype Const a b = Const a)

Addresses Trac #9984

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
hvr updated this revision to Diff 2120.Jan 14 2015, 6:45 AM
hvr retitled this revision from to Add Eq, Ord, Show, and Read instances for Const.
hvr updated this object.
hvr edited the test plan for this revision. (Show Details)
hvr added a reviewer: ekmett.
hvr updated the Trac tickets for this revision.
ekmett accepted this revision.Jan 14 2015, 12:38 PM
ekmett edited edge metadata.

Looks good to me.

This revision is now accepted and ready to land.Jan 14 2015, 12:38 PM
Closed by commit rGHCc71fb84b8c9e: Add Eq, Ord, Show, and Read instances for Const (authored by Fumiaki Kinoshita <fumiexcel@gmail.com>, committed by hvr). · Explain WhyJan 14 2015, 1:52 PM
This revision was automatically updated to reflect the committed changes.