aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Waern <davve@dtek.chalmers.se>2008-01-07 18:18:02 +0000
committerDavid Waern <davve@dtek.chalmers.se>2008-01-07 18:18:02 +0000
commitaa28826a8d512aa49506038edfe047458fc41ecb (patch)
treec4e23f7cf1f9e7e35a30c19fe22cc5437c32f1ee /src
parent7e577ff2603fc87fd9ca950974d50449cd2be8ac (diff)
Add documentation for readInterfaceFile
Diffstat (limited to 'src')
-rw-r--r--src/Haddock/InterfaceFile.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Haddock/InterfaceFile.hs b/src/Haddock/InterfaceFile.hs
index 2fcb9351..fe383336 100644
--- a/src/Haddock/InterfaceFile.hs
+++ b/src/Haddock/InterfaceFile.hs
@@ -96,7 +96,11 @@ writeInterfaceFile filename iface = do
writeBinMem bh filename
return ()
-
+-- | Read a Haddock (@.haddock@) interface file. Return either an
+-- 'InterfaceFile' or an error message. If given a GHC 'Session', the function
+-- registers all read names in the name cache of the session.
+-- The aim is to be compatible with interface files produced by any Haddock
+-- of version 2.0.0.0 or greater.
readInterfaceFile :: Maybe Session -> FilePath -> IO (Either String InterfaceFile)
readInterfaceFile mbSession filename = do
bh <- readBinMem filename