Skip to content

Make TimeLocale an instance of Def

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.

Trac metadata
Trac field Value
Version 7.2.2
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/old-time
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information