time and old-locale

Michael Snoyman michael at snoyman.com
Sun Aug 24 10:44:11 UTC 2014


On Sun, Aug 24, 2014 at 8:18 AM, Ashley Yakeley <ashley at semantic.org> wrote:

> For time-1.5, I'm removing the dependency on old-locale, and including
> that code directly in Data.Time.Format. The package will also include its
> own deprecated System.Locale.
>
> I expect this to be a popular, decade-overdue move, but if you have some
> complaint, let me know before I release it.
>
> Repository is at https://github.com/haskell/time
>
>
I'm +1 on the general concept of moving away from old-locale, so I'm happy
this is happening, thanks Ashley!

One concern I have is that, with this move, we'll now have two core
packages both exporting a System.Locale module, which can cause a bit of
mayhem for users. Users with cabal files can simply avoid including
`old-locale`, but that would mean that it would be difficult to maintain
backwards compatibility with time 1.4. Another possibility would be
encouraging users to use cabal flags for conditional compilation.

What about instead of providing System.Locale, renaming it to something
like System.OldLocale. And then also releasing a new version in the time
1.4 series that re-exports old-locale's System.Locale module under the name
System.OldLocale as well. I think that might make it a bit easier to have
an upgrade path: users would be able to import System.OldLocale regardless
of using time 1.4 or 1.5.

I also agree with Roman's idea of exporting the locale stuff (or at the
very least defaultTimeLocale) from Data.Time.Format, which might be an even
easier way to have a migration path.

I think there's probably a better proposal to the one I'm making here, so
consider it a strawman to start a conversation. I just want to avoid a
situation where new users go into GHCi, type `import System.Locale`, and
get very confused.

Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140824/5fbcd3a6/attachment.html>


More information about the Libraries mailing list