aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock
diff options
context:
space:
mode:
authorZubin Duggal <zubin@cmi.ac.in>2019-05-25 16:47:55 +0530
committerMatthew Pickering <matthewtpickering@gmail.com>2019-05-30 10:57:51 +0100
commit83bb9870a117f9426e6f6cff6fec3bb6e93a7c18 (patch)
tree51b8bf326814c7c62c5ad58fb2379a873890c130 /haddock-api/src/Haddock
parentf01473ed28e7c2700ff8e87b00ab87a802c9edd9 (diff)
update for new way to store hiefile headers
Diffstat (limited to 'haddock-api/src/Haddock')
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker.hs b/haddock-api/src/Haddock/Backends/Hyperlinker.hs
index 251c886b..7571db9e 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker.hs
@@ -19,7 +19,7 @@ import System.Directory
import System.FilePath
import HieTypes ( HieFile(..), HieASTs(..) )
-import HieBin ( readHieFile )
+import HieBin ( readHieFile, hie_file_result)
import Data.Map as M
import FastString ( mkFastString )
import Module ( Module, moduleName )
@@ -60,7 +60,8 @@ ppHyperlinkedModuleSource srcdir pretty srcs iface = case ifaceHieFile iface of
, hie_asts = HieASTs asts
, hie_types = types
, hie_hs_src = rawSrc
- } <- fmap fst (readHieFile (initNameCache u []) hfp)
+ } <- (hie_file_result . fst)
+ <$> (readHieFile (initNameCache u []) hfp)
-- Get the AST and tokens corresponding to the source file we want
let mast | M.size asts == 1 = snd <$> M.lookupMin asts