cabal-version: >=1.10
name: human-readable-duration
version: 0.2.1.0
license: BSD3
license-file: LICENSE
maintainer: yann.esposito@gmail.com
author: Yann Esposito
homepage: https://gitlab.esy.fun/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
build-type: Simple
source-repository head
type: git
location: https://github.com/yogstoth/human-readable-duration
library
exposed-modules:
Data.Duration
Data.Duration.Tutorial
hs-source-dirs: src
default-language: Haskell2010
build-depends:
base >=4.7 && <5
test-suite doctest
type: exitcode-stdio-1.0
main-is: DocTest.hs
hs-source-dirs: test
default-language: Haskell2010
ghc-options: -Wall
build-depends:
base >=4.7 && <5,
Glob >=0.7 && <0.10,
human-readable-duration -any,
doctest >=0.9.12 && <0.17
benchmark hrd-bench
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: bench
default-language: Haskell2010
ghc-options: -Wall -threaded
build-depends:
base >=4.7 && <5,
criterion >=1.1.0.0 && <1.6,
human-readable-duration -any