You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.9 KiB

7 years ago
name: human-readable-duration
3 years ago
version: 0.2.1.4
7 years ago
synopsis: Provide duration helper
3 years ago
homepage: https://gitlab.esy.fun/yogsototh/human-readable-duration#readme
7 years ago
license: BSD3
license-file: LICENSE
author: Yann Esposito
maintainer: yann.esposito@gmail.com
category: Time
build-type: Simple
cabal-version: >=1.10
extra-source-files:
README.md
stack.yaml
7 years ago
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"
7 years ago
> getYears duration
> -- will return 2
> getDays duration
> -- will return 763
7 years ago
> getMs duration
> -- will return 65923323002
7 years ago
library
hs-source-dirs: src
exposed-modules: Data.Duration
6 years ago
Data.Duration.Tutorial
7 years ago
build-depends: base >= 4.7 && < 5
default-language: Haskell2010
ghc-options: -Wall -Wincomplete-uni-patterns -Wredundant-constraints -Wnoncanonical-monad-instances
7 years ago
6 years ago
test-suite doctest
6 years ago
type: exitcode-stdio-1.0
hs-source-dirs: test
6 years ago
main-is: DocTest.hs
6 years ago
build-depends: base >= 4.7 && < 5
6 years ago
, Glob >= 0.7
6 years ago
, human-readable-duration
3 years ago
, time
6 years ago
, doctest >= 0.9.12
ghc-options: -Wall
6 years ago
default-language: Haskell2010
7 years ago
6 years ago
benchmark hrd-bench
type: exitcode-stdio-1.0
hs-source-dirs: bench
main-is: Main.hs
ghc-options: -Wall -threaded
6 years ago
default-language: Haskell2010
build-depends: base >= 4.7 && < 5
, criterion >= 1.1.0.0
, human-readable-duration
7 years ago
source-repository head
type: git
location: https://gitlab.esy.fun/yogsototh/human-readable-duration