1diff -ru orig/src/General/Web.hs new/src/General/Web.hs
2--- orig/src/General/Web.hs 2014-06-09 15:25:38.583521732 +0300
3+++ new/src/General/Web.hs 2014-06-09 15:25:38.000000000 +0300
8+#if MIN_VERSION_wai(3, 0, 0)
11 #if MIN_VERSION_wai(2, 0, 0)
12 import Network.Wai.Internal
16 responseFlatten :: Response -> IO (Status, ResponseHeaders, LBString)
17 responseFlatten r = do
18-#if MIN_VERSION_wai(2, 0, 0)
19+#if MIN_VERSION_wai(3, 0, 0)
20+ let (s,hs,withBody) = responseToStream r
21+ ref <- newIORef mempty
22+ let addChunk builder = modifyIORef ref (<> builder)
23+ withBody $ \body -> body addChunk (return ())
24+ builder <- readIORef ref
25+ let res = toLazyByteString builder
27+#elif MIN_VERSION_wai(2, 0, 0)
28 let (s,hs,withSrc) = responseToSource r
29 chunks <- withSrc $ \src -> src $$ consume
30 let res = toLazyByteString $ mconcat [x | Chunk x <- chunks]
31diff -ru orig/src/Web/Server.hs new/src/Web/Server.hs
32--- orig/src/Web/Server.hs 2014-06-09 15:25:38.575521732 +0300
33+++ new/src/Web/Server.hs 2014-06-09 15:25:38.000000000 +0300
37 putStrLn $ "Starting Hoogle Server on port " ++ show port
38- runSettings defaultSettings{settingsOnException=exception, settingsPort=port} $ \r -> liftIO $ do
39+ runSettings defaultSettings{settingsOnException=exception, settingsPort=port}
40+#if MIN_VERSION_wai(3, 0, 0)
41+ $ \r sendResponse -> do
45 start <- getCurrentTime
48 stop <- getCurrentTime
49 let t = floor $ diffUTCTime stop start * 1000
50 withMVar v $ const $ putStrLn $ bsUnpack (rawPathInfo r) ++ bsUnpack (rawQueryString r) ++ " ms:" ++ show t
51+#if MIN_VERSION_wai(3, 0, 0)
58 #if MIN_VERSION_wai(2, 0, 0)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list