aboutsummaryrefslogtreecommitdiff
path: root/src/Distribution/Haddock.hs
blob: bf57605ee30b6108ea19aa7bbd5a7e9690e8362e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module Distribution.Haddock (
  readInterfaceFile,
  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)