Hoogle Search

Within LTS Haskell 24.58 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. fixupResponse :: Request -> Response -> IO Response

    snap-core Snap.Internal.Core

    Post-process a finalized HTTP response:

    • fixup content-length header
    • properly handle 204/304 responses
    • if request was HEAD, remove response body
    Note that we do NOT deal with transfer-encoding: chunked or "connection: close" here.

  2. package unix-time

    Unix time parser/formatter and utilities Fast parser/formatter/utilities for Unix time

  3. module Data.UnixTime

    No documentation available.

  4. data UnixDiffTime

    unix-time Data.UnixTime

    Data structure for UnixTime diff. It is up to the user to ensure that udtMicroSeconds < 1000000. Helpers such as microSecondsToUnixDiffTime can help you to create valid values. For example, it's a mistake to use addUnixDiffTime with a value UnixDiffTime 0 9999999 as it will produce an incorrect value back. You should instead use functions such as microSecondsToUnixDiffTime to create values that are in-range. This avoids any gotchas when then doing comparisons.

  5. UnixDiffTime :: CTime -> Int32 -> UnixDiffTime

    unix-time Data.UnixTime

    No documentation available.

  6. data UnixTime

    unix-time Data.UnixTime

    Data structure for Unix time. Please note that this uses GHC-derived Eq and Ord instances. Notably

    >>> UnixTime 1 0 > UnixTime 0 999999999
    True
    
    You should instead use UnixDiffTime along with its helpers such as microSecondsToUnixDiffTime which will ensure that such unusual values are never created.

  7. UnixTime :: CTime -> Int32 -> UnixTime

    unix-time Data.UnixTime

    No documentation available.

  8. addUnixDiffTime :: UnixTime -> UnixDiffTime -> UnixTime

    unix-time Data.UnixTime

    Adding difference to UnixTime.

    >>> UnixTime 100 2000 `addUnixDiffTime` microSecondsToUnixDiffTime ((-1003000) :: Int)
    UnixTime {utSeconds = 98, utMicroSeconds = 999000}
    

  9. diffUnixTime :: UnixTime -> UnixTime -> UnixDiffTime

    unix-time Data.UnixTime

    Calculating difference between two UnixTime.

    >>> UnixTime 100 2000 `diffUnixTime` UnixTime 98 2100
    UnixDiffTime {udtSeconds = 1, udtMicroSeconds = 999900}
    

  10. formatUnixTime :: Format -> UnixTime -> IO ByteString

    unix-time Data.UnixTime

    Formatting UnixTime to ByteString in local time. This is a wrapper for strftime_l(). utMicroSeconds is ignored. The result depends on the TZ environment variable.

Page 185 of many | Previous | Next