Search code examples
haskellversioninghackage

How do indicate that a Haskell package is in either an alpha/beta/release candidate stage?


Let us say that I have worked on a haskell library and am now ready to release a beta version of the software to hackage/make repo public on github etc.

Possible Solutions and why they do not work for me
  1. Use packagename-0.0.0.1-alpha or similar.
    The problem here is quite simple: The Haskell PVP Specification does not allow it: (bold is me)

The components of the version number MUST be numbers! Historically Cabal supported version numbers with string tags at the end, e.g. 1.0-beta This proved not to work well because the ordering for tags was not well defined. Version tags are no longer supported and mostly ignored, however some tools will fail in some circumstances if they encounter them.

  1. Just use packagename-0.* until it is out of alpha/beta (and then use packagename-1.*).
    The problem here is twofold:
    1. This method would not work for describing relase candidates which are post version 1.
    2. Programmers from other ecosystems, such as that of rust, where it is quite common to have a stable library in 0.*, might wrongly assume that this library is stable. (Of course, it could be mitigated somewhat with a warning in the README, but I would prefer a better solution still.)

So, what is the best (and most conventional in haskell) way to indicate that the library version is in alpha/beta stage of development or is a release candidate?


Solution

  • As far as I know, there is not a package-wide way to say this. However, you can add a module description that describes the stability of the module to each of your modules' documentation.

    {-|
    Stability: experimental
    -}
    module PackageName.ModuleName where