[Haskell-cafe] Haskell interface file (.hi) format?
hoelz at wisc.edu
Thu Nov 29 20:47:14 EST 2007
Claus Reinke <claus.reinke at talk21.com> wrote:
> > Does anyone know if/where I can find a specification for the .hi
> > files generated by GHC? I ask because I want to write an
> > omni-completion plugin for Vim to make Haskell hacking a bit nicer.
> you might find it easier to use GHCi's :browse command
> $ ghc -e ':browse Control.Concurrent.MVar'
> modifyMVar :: MVar a -> (a -> IO (a, b)) -> IO b
> modifyMVar_ :: MVar a -> (a -> IO a) -> IO ()
> readMVar :: MVar a -> IO a
> swapMVar :: MVar a -> a -> IO a
> withMVar :: MVar a -> (a -> IO b) -> IO b
> data MVar a = GHC.IOBase.MVar (GHC.Prim.MVar# GHC.Prim.RealWorld
> a) addMVarFinalizer :: MVar a -> IO () -> IO ()
> isEmptyMVar :: MVar a -> IO Bool
> newEmptyMVar :: IO (MVar a)
> newMVar :: a -> IO (MVar a)
> putMVar :: MVar a -> a -> IO ()
> takeMVar :: MVar a -> IO a
> tryPutMVar :: MVar a -> a -> IO Bool
> tryTakeMVar :: MVar a -> IO (Maybe a)
> that is what the haskell mode plugins for vim use, for one
> of their completion modes, anyway;-)
> (actually, that completion is wrt to imported identifiers,
> so we simply do a ':browse *<current_module>'; another
> completion mode is based on haddock indices, and then
> there are the standard occurs-in-imported-source-files
> and occurs-in-tags-file completions)
Wow! Thanks for saving me a ton of work, everyone!
More information about the Haskell-Cafe