diff options
Diffstat (limited to 'haddock-api/src/Haddock/InterfaceFile.hs')
-rw-r--r-- | haddock-api/src/Haddock/InterfaceFile.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/InterfaceFile.hs b/haddock-api/src/Haddock/InterfaceFile.hs index 4b66348c..73185092 100644 --- a/haddock-api/src/Haddock/InterfaceFile.hs +++ b/haddock-api/src/Haddock/InterfaceFile.hs @@ -14,7 +14,7 @@ -- Reading and writing the .haddock interface file ----------------------------------------------------------------------------- module Haddock.InterfaceFile ( - InterfaceFile(..), ifUnitId, + InterfaceFile(..), ifUnitId, ifModule, readInterfaceFile, nameCacheFromGhc, freshNameCache, NameCacheAccessor, writeInterfaceFile, binaryInterfaceVersion, binaryInterfaceVersionCompatibility ) where @@ -25,7 +25,6 @@ import Haddock.Utils hiding (out) import Control.Monad import Data.Array -import Data.Functor ((<$>)) import Data.IORef import Data.List import qualified Data.Map as Map @@ -52,6 +51,12 @@ data InterfaceFile = InterfaceFile { } +ifModule :: InterfaceFile -> Module +ifModule if_ = + case ifInstalledIfaces if_ of + [] -> error "empty InterfaceFile" + iface:_ -> instMod iface + ifUnitId :: InterfaceFile -> UnitId ifUnitId if_ = case ifInstalledIfaces if_ of |