[Haskell-cafe] The 8 Most Important GSoC Projects
dons at galois.com
Thu Apr 1 21:48:43 EDT 2010
> Stephen Tetley <stephen.tetley at gmail.com> writes:
> > I had a little experiment along the lines of "A Package Versioning
> > Policy Checker" a few months ago. I got as far as using
> > Haskell-src-exts to extract module export list, but didn't work out
> > out a hashing scheme for the actual type signatures.
> I've been thinking of doing something similar for a year or so now, but
> there's one big problem that I can think of: how to deal with functions
> that don't have an explicit type signature in the source. My
> understanding is that to derive these signatures at "checking time"
> would require using something like the GHC API, which immediately
> reduces the "niceness" and portability of such a tool/library.
Well, you can 'script' GHC:
$ ghc -ddump-types A.hs -fno-code
replicateM :: forall (v :: * -> *) a.
(G.Vector v a) =>
Int -> IO a -> IO (v a)
replicateS :: forall a (m :: * -> *) (v :: * -> * -> *).
(Control.Monad.Primitive.PrimMonad m, M.MVector v a) =>
Int -> a -> m (v (Control.Monad.Primitive.PrimState m) a)
To at least get the fully qualified types exported from a module.
More information about the Haskell-Cafe