
I don't have anything to answer for the "interesting" part of your
question, but if you're just interested in getting something
working...
On Feb 16, 2008 3:13 PM, Dave Hinton
2. If GHC's implementation is working as designed, how do I translate the C program above into Haskell?
You can use the FFI to call localtime() directly; see
http://www.haskell.org/haskellwiki/FFI_Introduction
There's information on the types to use here:
http://haskell.org/ghc/docs/latest/html/libraries/base/Foreign-C.html
http://haskell.org/ghc/docs/latest/html/libraries/base/Foreign.html
Something along the lines of:
{-# LANGUAGE FFI #-}
{-# INCLUDE