2015-08-13 14:47:36 +00:00
|
|
|
name: human-readable-duration
|
2019-06-25 15:56:44 +00:00
|
|
|
version: 0.2.1.4
|
2015-08-13 14:47:36 +00:00
|
|
|
synopsis: Provide duration helper
|
2018-12-28 19:37:17 +00:00
|
|
|
homepage: https://gitlab.esy.fun/yogsototh/human-readable-duration#readme
|
2015-08-13 14:47:36 +00:00
|
|
|
license: BSD3
|
|
|
|
license-file: LICENSE
|
|
|
|
author: Yann Esposito
|
|
|
|
maintainer: yann.esposito@gmail.com
|
|
|
|
category: Time
|
|
|
|
build-type: Simple
|
|
|
|
cabal-version: >=1.10
|
2018-12-28 19:49:19 +00:00
|
|
|
extra-source-files:
|
|
|
|
README.md
|
|
|
|
stack.yaml
|
2015-08-13 15:14:26 +00:00
|
|
|
description:
|
|
|
|
This is a minimal Haskell library to display duration.
|
|
|
|
.
|
|
|
|
> let duration = 2 * ms + 3 * oneSecond + 2 * minute + 33*day + 2*year
|
|
|
|
> humanReadableDuration duration
|
2015-11-25 19:55:57 +00:00
|
|
|
> -- will return: "2 years 33 days 2 min 3s 2ms"
|
2015-08-13 15:14:26 +00:00
|
|
|
> getYears duration
|
|
|
|
> -- will return 2
|
|
|
|
> getDays duration
|
2015-11-25 19:55:57 +00:00
|
|
|
> -- will return 763
|
2015-08-13 15:14:26 +00:00
|
|
|
> getMs duration
|
2015-11-25 19:55:57 +00:00
|
|
|
> -- will return 65923323002
|
2015-08-13 14:47:36 +00:00
|
|
|
|
|
|
|
library
|
|
|
|
hs-source-dirs: src
|
|
|
|
exposed-modules: Data.Duration
|
2016-05-12 17:16:13 +00:00
|
|
|
Data.Duration.Tutorial
|
2015-08-13 14:47:36 +00:00
|
|
|
build-depends: base >= 4.7 && < 5
|
|
|
|
default-language: Haskell2010
|
2018-12-28 19:49:19 +00:00
|
|
|
ghc-options: -Wall -Wincomplete-uni-patterns -Wredundant-constraints -Wnoncanonical-monad-instances
|
2015-08-13 14:47:36 +00:00
|
|
|
|
2016-05-22 23:09:33 +00:00
|
|
|
test-suite doctest
|
2016-05-06 22:17:38 +00:00
|
|
|
type: exitcode-stdio-1.0
|
|
|
|
hs-source-dirs: test
|
2016-05-22 23:09:33 +00:00
|
|
|
main-is: DocTest.hs
|
2016-05-06 22:17:38 +00:00
|
|
|
build-depends: base >= 4.7 && < 5
|
2016-05-22 23:09:33 +00:00
|
|
|
, Glob >= 0.7
|
2016-05-06 22:17:38 +00:00
|
|
|
, human-readable-duration
|
2019-06-25 15:55:56 +00:00
|
|
|
, time
|
2016-05-06 22:17:38 +00:00
|
|
|
, doctest >= 0.9.12
|
2018-12-28 19:26:11 +00:00
|
|
|
ghc-options: -Wall
|
2016-05-06 22:17:38 +00:00
|
|
|
default-language: Haskell2010
|
2015-08-13 14:47:36 +00:00
|
|
|
|
2016-05-14 23:50:46 +00:00
|
|
|
benchmark hrd-bench
|
|
|
|
type: exitcode-stdio-1.0
|
|
|
|
hs-source-dirs: bench
|
|
|
|
main-is: Main.hs
|
2018-12-28 19:26:11 +00:00
|
|
|
ghc-options: -Wall -threaded
|
2016-05-14 23:50:46 +00:00
|
|
|
default-language: Haskell2010
|
|
|
|
build-depends: base >= 4.7 && < 5
|
|
|
|
, criterion >= 1.1.0.0
|
|
|
|
, human-readable-duration
|
|
|
|
|
2015-08-13 14:47:36 +00:00
|
|
|
source-repository head
|
|
|
|
type: git
|
2018-12-28 19:41:46 +00:00
|
|
|
location: https://gitlab.esy.fun/yogsototh/human-readable-duration
|