aboutsummaryrefslogtreecommitdiff
path: root/haddock-api
diff options
context:
space:
mode:
authorZubin Duggal <zubin@cmi.ac.in>2019-05-25 16:47:55 +0530
committerBen Gamari <ben@smart-cactus.org>2019-06-04 18:57:42 -0400
commit91c65619149f4866abcce33a56036e2e2454629f (patch)
tree5a77399761645cd91fe3eadb097dcc48a8235624 /haddock-api
parent91f55209065497c8cd0d0a23e5ed5561410b4df0 (diff)
update for new way to store hiefile headers
Diffstat (limited to 'haddock-api')
-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