API-tracker to check compliance with package versioning policy---advice please?

Damon Wang damonwang at uchicago.edu
Mon Mar 22 23:43:29 EDT 2010

Hello everyone,

I'm interested in writing the API-tracker described here
Mr. Marlow suggested I discuss it on the mailing list first. If this is
the wrong list, I'm sorry, and I'd appreciate knowing where to find the
correct one.

This email consists of two parts: a high-level description of how I'd
like to write the API-tracker, and the problems I encountered once I
tried to bring that down to the level of actually writing code. I'd
appreciate advice and criticism on both.

>From the package versioning policy here
it seems like the most foolproof way to validate a revised module's
version number would be to diff the types of each exported symbol.

There's a previous thread on this list by Laszlo Nagy suggesting that we
query other services that might already have this information, but the
replies seemed to be of the opinion that it would be better to have
fewer dependencies. I assume if this is meant to validate submitted
packages, read access to both before and after versions are guaranteed.

What do people think of the overall strategy?

Following the suggestion of using the existing introspection tools in
GHC, I found the modInfoExports and modInfoLookupName functions.
However, I'm having some trouble understanding the GHC API because
only provides type information and sometimes a few cryptic comments.

The other thing I've been trying is reading the Haddock source, because
it's basically solving the same problem, right? Unfortunately, both
efforts are stalling because I lack the necessary background knowledge
of how GHC handles types.

Is there a more verbose, newbie-friendly documentation that will answer
questions like,
    "Suppose I have a function foo :: String -> String. How does GHC
    represent the type of this function?"

I think
has the information I need to answer that question, or at least to read
the GHC API reference. Unfortunately---you guessed it!---I don't know
enough to understand the commentary.

If all else fails, I supposed I'll just go post my questions in
[beginners] or [haskell-cafe], but I'd prefer not to bother people

In any case, thanks for your attention. I welcome any advice.

Damon Wang

More information about the cabal-devel mailing list