MyNixOS website logo
Description

A library providing definitions to work with monetary values.

Please see the README on GitHub at https://github.com/telostat/haspara#readme

haspara

Hackage version GitHub release (latest by date) GitHub contributors GitHub

Note: This software is under development and of prototype quality at the moment. Expect significant breaking changes without notification until we reach the first minor version. Until then, we will keep bumping the patch version.

haspara is a Haskell library that provides monetary definitions and a rudimentary (and experimental) accounting functionality.

Supported GHC Versions

  1. ghc90
  2. ghc92

At the moment, there is no particular reason for not supporting ghc94 except that required settings are not done yet in Nix support files, in particular for Cabal dependency.

Testing Against GHC Versions

You can use Nix support to test against different GHC versions:

nix-build --arg compiler "\"ghc92\""
nix-build --arg compiler "\"ghc90\""

nix-build command will default to ghc90. Check ./default.nix file for the default ghc version in case that this documentation is out of date.

Development

Before committing code to repository, reformat the code:

fourmolu -i src/ test/

Compile the codebase, check warnings and errors:

cabal build -O0
cabal test -O0
cabal haddock -O0

Run hlint:

hlint src/

Run weeder:

weeder --require-hs-files

Making Releases

  1. Checkout main branch:

    git checkout main
    
  2. Ensure that your branch is up to date:

    git pull
    
  3. Update the version information in package.yaml if required, run hpack to reflect the change on the .cabal file, and recompile the project, run tests and generate Haddock documentation:

    hpack
    cabal clean
    cabal build -O0
    cabal test -O0
    cabal haddock -O0
    nix-build --arg compiler "\"ghc92\""
    nix-build --arg compiler "\"ghc90\""
    
  4. Update CHANGELOG.md file:

    git-chglog --next-tag <NEW-VERSION> -o CHANGELOG.md
    
  5. Commit, tag and push:

    git commit -am "chore(release): <NEW-VERSION>"
    git tag -a -m "Release <NEW-VERSION>" <NEW-VERSION>
    git push --follow-tags origin main
    
  6. Create the package, upload to Hackage as a candidate first and check the result:

    cabal clean
    cabal build -O0
    cabal test -O0
    cabal haddock -O0
    cabal sdist
    cabal upload <path to .tar.gz archive>
    
  7. If the candidate package release works fine, release to Hackage:

    cabal upload --publish <path to .tar.gz archive>
    

License

Copyright Telostat Pte Ltd (c) 2021-2022.

This work is licensed under MIT license. See LICENSE.

Metadata

Version

0.0.0.8

License

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows