packages feed

http-date 0.0.8 → 0.0.9

raw patch · 2 files changed

+8/−7 lines, 2 filesdep ~base

Dependency ranges changed: base

Files

Network/HTTP/Date/Converter.hs view
@@ -4,8 +4,6 @@                                    , utcToHTTPDate                                    ) where -import Control.Applicative-import Data.ByteString.Internal import Data.Time import Data.Time.Calendar.WeekDate import Data.Word@@ -13,7 +11,7 @@ import Foreign.Ptr import Foreign.Storable import Network.HTTP.Date.Types-import System.IO.Unsafe (unsafePerformIO)+import System.IO.Unsafe (unsafeDupablePerformIO, unsafePerformIO) import System.Posix.Types  {-|@@ -94,10 +92,10 @@     isLeap year = year `rem` 4 == 0               && (year `rem` 400 == 0 ||                   year `rem` 100 /= 0)-    (months, daysArr) = if isLeap yy+    (mnths, daysArr) = if isLeap yy       then (leapMonth, leapDayInMonth)       else (normalMonth, normalDayInMonth)-    findMonth n = inlinePerformIO $ (,) <$> (peekElemOff months n) <*> (peekElemOff daysArr n)+    findMonth n = unsafeDupablePerformIO $ (,) <$> (peekElemOff mnths n) <*> (peekElemOff daysArr n)  ---------------------------------------------------------------- 
http-date.cabal view
@@ -1,5 +1,5 @@ Name:                   http-date-Version:                0.0.8+Version:                0.0.9 Author:                 Kazu Yamamoto <kazu@iij.ad.jp> Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp> License:                BSD3@@ -7,10 +7,11 @@ Synopsis:               HTTP Date parser/formatter Description:            Fast parser and formatter for HTTP Date Category:               Network, Web-Cabal-Version:          >= 1.8+Cabal-Version:          >= 1.10 Build-Type:             Simple  Library+  Default-Language:     Haskell2010   GHC-Options:          -Wall   Exposed-Modules:      Network.HTTP.Date   Other-Modules:        Network.HTTP.Date.Converter@@ -24,6 +25,7 @@                       , time  Test-Suite spec+  Default-Language:     Haskell2010   Type:                 exitcode-stdio-1.0   HS-Source-Dirs:       test   Main-Is:              Spec.hs@@ -37,6 +39,7 @@                       , time  Test-Suite doctests+  Default-Language:     Haskell2010   Type:                 exitcode-stdio-1.0   HS-Source-Dirs:       test   Ghc-Options:          -threaded