[Haskell-cafe] Converting EpochTime to Integer
roma at ro-che.info
Wed Sep 16 13:54:54 UTC 2015
On 16/09/15 16:04, Brandon Allbery wrote:
> On Wed, Sep 16, 2015 at 7:19 AM, Bram Neijt <bneijt at gmail.com
> <mailto:bneijt at gmail.com>> wrote:
> If I use
> return (toInteger mtime)
> I get
> No instance for (Integral System.Posix.Types.EpochTime)
> I had been wondering about the claim that it had an Integral instance,..
> it has Num but not Integral.
> It *does* have an Enum instance, so fromEnum shoiuld work.
Except that's not 2038-safe (fromEnum :: Enum a => a -> Int).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the Haskell-Cafe