[Haskell-cafe] ANN: precis-0.3.1 - Cabal package diff tool

Stephen Tetley stephen.tetley at gmail.com
Thu May 13 12:48:25 EDT 2010


Hi Roel

Thanks for the information.

With Precis, I wanted to make a standalone tool rather than work with
GHC-API. I don't know how stable GHC-API, but I expect it to be less
stable than haskell-src-exts, and as Precis is a tool to help gauge
the stability of packages I want it to be stable itself. Certainly, I
don't want to be committed to getting it to work with each GHC
revision.

The downside to this that Precis will always lack some of the power
that it could get from GHC-API. Modules with inline FFI code won't
parse, and evidently Unicode symbols don't parse either. Also, even
after a successful parse, the analysis that Precis does is quite
shallow, diffs are calculated by pretty printing the AST of the
relevant constructions (module export lists, type signatures of
functions/constants..., class instances, data and class declarations).

Because the analysis is shallow - quite a few false positives are
generated. Changing say a type alias will indicate a change, e.g. the
code below will indicate a change but the change shouldn't merit a
major version number change:

doesFileExist :: FilePath -> IO Bool
doesFileExist :: String -> IO Bool

This is the reason I stop short of considering Precis a Package
Version Policy checker and only report numbers of apparent changes not
a conclusion drawn from them, as I think Henning suggested. From the
work done to get Precis where it is, I'd wager trying to build a fully
automatic PVP checker would be more effort that its usefulness would
merit.

Best wishes

Stephen


More information about the Haskell-Cafe mailing list