Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#7263 closed feature request (fixed)

Add derived Show instances to GHC.Generics

Reported by: dag Owned by: dreixel
Priority: normal Milestone: 7.8.1
Component: GHC API Version: 7.7
Keywords: generics Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

This would make it easier to learn to use generics by exploration from GHCi.

Change History (13)

comment:1 Changed 6 years ago by dreixel

Owner: set to dreixel
Version: 7.6.17.7

Can anyone think of a good reason not to do this? I can't. Perhaps we should derive also Eq, Read, and maybe even Generic itself?

comment:2 Changed 6 years ago by spl

Even Data and Typeable, perhaps?

comment:3 in reply to:  2 Changed 6 years ago by dreixel

Replying to spl:

Even Data and Typeable, perhaps?

No, not those. If someone would want that I would explicitly like to hear it. I suspect that such a request would involve not really understanding the whole purpose of these representation types.

comment:4 Changed 6 years ago by dreixel

Done: [219ea0e539aca217fe1819baf02d4cdd1d670f51/base]

Is it worth/possible to merge this into 7.6?

Last edited 5 years ago by hvr (previous) (diff)

comment:5 Changed 6 years ago by spl

When I was working on EMGM, I found it useful to have Read, Show, Eq, and Ord. I'm playing with generic-deriving, and I just discovered that there is no Ord instance. This is convenient to have for U1.

comment:6 in reply to:  4 Changed 6 years ago by igloo

difficulty: Unknown

Replying to dreixel:

Is it worth/possible to merge this into 7.6?

We try not to make interface changes within stable branches.

comment:7 Changed 6 years ago by igloo

Milestone: 7.8.1

comment:8 Changed 5 years ago by monoidal

So the main part is already pushed, and the only remaining part is possibly adding Ord (comment:5). Let's finish the ticket.

dreixel, spl: what's the decision - do we want Ord for U1 only, or for all types which got Eq/Show/Read in [219ea0e539aca217fe1819baf02d4cdd1d670f51/base], or something else?

comment:9 Changed 5 years ago by dreixel

It can be added to all of them, as far as I'm concerned.

comment:10 Changed 5 years ago by Krzysztof Gogolewski <krz.gogolewski@…>

In fe70999f28f0f658ba00647c1178138eeaf4462c/base:

Add Ord instances for GHC.Generics (#7263)

comment:11 Changed 5 years ago by monoidal

Resolution: fixed
Status: newclosed

Done.

comment:12 Changed 5 years ago by hvr

...has a release notes entry for 7.8.1 been written yet?

Note: See TracTickets for help on using tickets.