Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6c32b3a

Browse files
committed
Fix up the stats display
1 parent 6e6c831 commit 6c32b3a

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Changelog for Hoogle (* = API change, @ = database format change)
22

3+
Fix up the output of /stats to account for API changes
34
#380, move results before left anchors in tab focus order
45
5.0.18.3, released 2021-12-24
56
Compatibility with aeson-2.0

src/Action/Server.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ replyServer log local links haddock store cdn home htmlDir scope Input{..} = cas
143143
stats <- getStatsDebug
144144
pure $ case stats of
145145
Nothing -> OutputFail $ lbstrPack "GHC Statistics is not enabled, restart with +RTS -T"
146-
Just x -> OutputText $ lbstrPack $ replace ", " "\n" $ takeWhile (/= '}') $ drop1 $ dropWhile (/= '{') $ show x
146+
Just x -> OutputText $ lbstrPack x
147147
"haddock":xs | Just x <- haddock -> do
148148
let file = intercalate "/" $ x:xs
149149
pure $ OutputFile $ file ++ (if hasTrailingPathSeparator file then "index.html" else "")

0 commit comments

Comments
 (0)