MyNixOS website logo
Description

Haskell PVP version adviser.

Policeman assists to properly choose the next version number according to PVP (Packaging Version Policy) for the Haskell packages based on the semantical changes to the interface.

Policeman

logo

GitHub CI Hackage MPL-2.0 license

👮 Policeman is the Kowainik's Bristol Haskell Hackathon project.

🏗 The current status is MVP, though it could already be used on ordinary cases.

Policeman assists to properly choose the next version number according to PVP (Packaging Version Policy) for the Haskell packages based on the semantical changes to the interface.

For a better understanding of the project basis and implementation details please refer to the following blog post:

Prerequisites

Policeman heavily uses some modern features of the Haskell compiler GHC. Therefore, in order to start using Policeman on the projects, you are required to have the following set:

  • Global GHC version 8.8 and higher
  • Support of GHC 8.8 and higher in your current project and the version you wish to compare to
  • cabal build tool version 3.0 or higher installed on your machine

Installation

The initial beta version of Policeman is already available on Hackage. To install it locally you need to execute the following commands:

cabal update
cabal install policeman

Alternatively, you can install the Policeman tool from the sources. For achieving that, you have a couple of options.

First one is to fetch the repo using cabal:

cabal get -s policeman

Or, you can clone the directory directly from GitHub:

git clone https://github.com/kowainik/policeman.git

The next steps are identical in both option. You need to step into the directory:

cd policeman

And finally, build and install the tool using cabal:

cabal install policeman:exe:policeman

How to use

By default, Policeman aims to compare your local version with the latest available Hackage version of the package. It grabs the information about your package automatically, so no need to provide that. That means that the simplest command looks like this:

policeman

It will output the suggested new version (if applicable) based on your local changes compared to the Hackage version.

Alternatively, you can provide the Hackage version you are willing to compare against. For that purpose, you can use -p | --previous option. For example:

policeman --previous "0.1.0.0"

Acknowledgement

Icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY.

Metadata

Version

0.0.0.0

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