Proposal: Use time rather than old-time in directory

Michael Snoyman michael at snoyman.com
Sun Oct 23 06:11:59 CEST 2011


On Sat, Oct 22, 2011 at 11:28 PM, Ian Lynagh <igloo at earth.li> wrote:
>
> Hi all,
>
> This proposal is to change directory to use the time package rather than
> the old-time package. This will hopefully be a significant step towards
> actually making the transition in general.
>
> I'm not sure if POSIXTime or UTCTime is the better type to use. Does
> anyone know?
>
> I started off with UTCTime, then switched to POSIXTime as UTCTime didn't
> have a Show instance. I've since found that actually UTCTime has both
> Show and Read instances, but they are orphaned. So actually, if UTCTime
> is the better type then switching back to UTCTime would allow us to fix
> this comment in hpc:
> -- We would rather use ClockTime in Mix, but ClockTime has no Read instance
> and simplify the code slightly.
>
>
> Attached are patches for directory, hpc and ghc.
>
>
> Suggested discussion period: Until 5th Nov 2011.
>
>
> Thanks
> Ian

+1. I'd like to transition to a single package as much as possible,
and I think UTCTime is the right data type.

Perhaps this belongs in a separate discussion, but is there any plan
to have time provide the locale stuff directly instead of our code
needing to depend on old-locale? If I'm not mistaken, implementing
such a strategy at the same time would mean that user code could then
ignore two old-* packages.

Michael



More information about the Libraries mailing list