Ticket #5806 (closed feature request: wontfix)

Opened 16 months ago

Last modified 16 months ago

Make TimeLocale an instance of Def

Reported by: chrisdone Owned by:
Priority: normal Milestone:
Component: libraries/old-time Version: 7.2.2
Keywords: Cc: andres.sicard.ramirez@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Whenever I use formatTime it's always with defaultTimeLocale. Why not make TimeLocale? an instance of Def from Data.Default?  http://hackage.haskell.org/package/data-default where def = defaultTimeLocale.

This would mean having to add data-default to GHC's distribution, but it's rather small and useful. The alternative is adding the instance in the data-default package, but then data-default depends on time-locale and we're still encouraging use of defaultTimeLocale. Swings and roundabouts.

Just an idea.

Change History

Changed 16 months ago by snoyberg

I like this idea. I also like the side-effect a lot: having Default in GHC's distribution would be a good thing IMO. I already use it in a number of places, and would encourage others to do so as well.

Changed 16 months ago by asr

  • cc andres.sicard.ramirez@… added

Changed 16 months ago by igloo

  • status changed from new to closed
  • difficulty set to Unknown
  • resolution set to wontfix

You mean "data-default depends on old-locale" I assume? If so then that's not a problem, as everyone will already have old-locale anyway as it comes with GHC and the Haskell Platform. Adding packages to GHC unnecessarily is a bad idea as it increases our workload, and makes it harder for other people to maintain them.

Note: See TracTickets for help on using tickets.