name: human-readable-duration
version: 0.2.0.2
cabal-version: >=1.10
build-type: Simple
license: BSD3
license-file: LICENSE
maintainer: yann.esposito@gmail.com
homepage: http://github.com/yogsototh/human-readable-duration#readme
synopsis: Provide duration helper
description:
This is a minimal Haskell library to display duration.
.
> let duration = 2 * ms + 3 * oneSecond + 2 * minute + 33*day + 2*year
> humanReadableDuration duration
> -- will return: "2 years 33 days 2 min 3s 2ms"
> getYears duration
> -- will return 2
> getDays duration
> -- will return 763
> getMs duration
> -- will return 65923323002
category: Time
author: Yann Esposito
source-repository head
type: git
location: https://github.com/yogstoth/human-readable-duration
library
exposed-modules:
Data.Duration
Data.Duration.Tutorial
build-depends:
base >=4.7 && <5
default-language: Haskell2010
hs-source-dirs: src
test-suite human-readable-duration-test
type: exitcode-stdio-1.0
main-is: Spec.hs
build-depends:
base >=4.7 && <5,
human-readable-duration >=0.2.0.2,
doctest >=0.9.12,
time >=1.5.0.0
default-language: Haskell2010
hs-source-dirs: test
ghc-options: -O2 -Wall
benchmark hrd-bench
type: exitcode-stdio-1.0
main-is: Main.hs
build-depends:
base >=4.7 && <5,
criterion >=1.1.0.0,
human-readable-duration >=0.2.0.2
default-language: Haskell2010
hs-source-dirs: bench
ghc-options: -O2 -Wall -threaded