diff options
author | davve@dtek.chalmers.se <David Waern> | 2007-03-25 00:46:48 +0000 |
---|---|---|
committer | davve@dtek.chalmers.se <David Waern> | 2007-03-25 00:46:48 +0000 |
commit | 6f55aa8b181d1cfcfb415a87733e530809332573 (patch) | |
tree | 4a9118ef06555ec818c1711ab61eb994758e481e /src/Distribution/Haddock.hs | |
parent | a7077e5f38d08888459acb33e276e29ce733f206 (diff) |
Start work on Haddock API
Diffstat (limited to 'src/Distribution/Haddock.hs')
-rw-r--r-- | src/Distribution/Haddock.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Distribution/Haddock.hs b/src/Distribution/Haddock.hs new file mode 100644 index 00000000..c6e2dd3b --- /dev/null +++ b/src/Distribution/Haddock.hs @@ -0,0 +1,17 @@ +module Distribution.Haddock ( + readInterfaceFile, + H.writeInterfaceFile, + H.InterfaceFile +) where + +import Haddock.Exception +import qualified Haddock.InterfaceFile as H + +import Control.Exception +import Control.Monad + +readInterfaceFile :: FilePath -> IO (Either String H.InterfaceFile) +readInterfaceFile f = + liftM Right (H.readInterfaceFile f) + `catchDyn` + (\(e::HaddockException) -> return $ Left $ show e) |