Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Commit 1dd23bf

Browse files
committed
Add debug code
1 parent c68f199 commit 1dd23bf

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

haddock-api/src/Haddock/Interface/Create.hs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,18 @@ mkTokenizedSrc :: ModSummary -> RenamedSource -> IO [RichToken]
885885
mkTokenizedSrc ms src =
886886
Hyperlinker.enrich src . Hyperlinker.parse <$> rawSrc
887887
where
888-
rawSrc = readFile $ msHsFilePath ms
888+
rawSrc = do
889+
putStrLn "rawSrc: Before readFile"
890+
let path = msHsFilePath ms
891+
putStrLn $ "rawSrc: reading: " ++ path
892+
inspect "rawSrc: After readFile" $ readFile $ path
893+
894+
895+
inspect s a = do
896+
r <- a
897+
putStrLn s
898+
putStrLn $ show $ length r
899+
return r
889900

890901
-- | Find a stand-alone documentation comment by its name.
891902
findNamedDoc :: String -> [HsDecl Name] -> ErrMsgM (Maybe HsDocString)

0 commit comments

Comments
 (0)