
Hello everyone, I'm interested in writing the API-tracker described here http://hackage.haskell.org/trac/summer-of-code/ticket/1565 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 http://www.haskell.org/haskellwiki/Package_versioning_policy 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 http://www.haskell.org/ghc/docs/latest/html/libraries/ghc-6.12.1/GHC.html 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 http://hackage.haskell.org/trac/ghc/wiki/Commentary 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 unncessarily. In any case, thanks for your attention. I welcome any advice. Yours, Damon Wang