[Haskell-cafe] This code produces an infinite output... why? it's a bug in ghc?

mariopal mariopal at gmail.com
Mon Jan 19 00:45:58 UTC 2015


This code produces an infinite output... why? it's a bug in ghc?

> -- Glasgow Haskell Compiler, Version 7.6.3 on Debian Sid
> import System.Locale (defaultTimeLocale)
> import Data.Time
> 
> 
> mkDated n = formatTime defaultTimeLocale "%FT%TZ" $ addUTCTime (3600*n) $ 
UTCTime (fromGregorian 2015 1 1) (timeOfDayToTime $ TimeOfDay 0 0 0)
> 
> main = mapM_ putStrLn $ map mkDated [0..2]




More information about the Haskell-Cafe mailing list