1diff -ru orig/src/General/Web.hs new/src/General/Web.hs
2--- orig/src/General/Web.hs 2013-12-04 19:36:25.387122831 +0200
3+++ new/src/General/Web.hs 2013-12-04 19:36:25.000000000 +0200
6 {-# LANGUAGE PatternGuards #-}
13+#if MIN_VERSION_wai(2, 0, 0)
14+import Network.Wai.Internal
16 import Network.HTTP.Types
17 import Data.CaseInsensitive(original)
18 import qualified Data.ByteString.Lazy.Char8 as LBS
21 responseFlatten :: Response -> IO (Status, ResponseHeaders, LBString)
22 responseFlatten r = do
23+#if MIN_VERSION_wai(2, 0, 0)
24+ let (s,hs,withSrc) = responseToSource r
25+ chunks <- withSrc $ \src -> src $$ consume
26+ let res = toLazyByteString $ mconcat [x | Chunk x <- chunks]
29 let (s,hs,rest) = responseSource r
30 chunks <- runResourceT $ rest $$ consume
31 let res = toLazyByteString $ mconcat [x | Chunk x <- chunks]
36 responseEvaluate :: Response -> IO ()
37diff -ru orig/src/Web/Server.hs new/src/Web/Server.hs
38--- orig/src/Web/Server.hs 2013-12-04 19:36:25.379122832 +0200
39+++ new/src/Web/Server.hs 2013-12-04 19:36:25.000000000 +0200
41-{-# LANGUAGE RecordWildCards, ScopedTypeVariables, PatternGuards #-}
42+{-# LANGUAGE RecordWildCards, ScopedTypeVariables, PatternGuards, CPP #-}
44 module Web.Server(server) where
47 import Data.Time.Clock
50+#if MIN_VERSION_wai(2, 0, 0)
51+import Network.Wai.Internal
53 import Network.Wai.Handler.Warp
60+#if MIN_VERSION_wai(2, 0, 0)
61+exception :: Maybe Request -> SomeException -> IO ()
62+exception _ e | Just (_ :: InvalidRequest) <- fromException e = return ()
63+ | otherwise = putStrLn $ "Error: " ++ show e
65 exception :: SomeException -> IO ()
66 exception e | Just (_ :: InvalidRequest) <- fromException e = return ()
67 | otherwise = putStrLn $ "Error: " ++ show e
71 respArgs :: CmdLine -> IO (IO ResponseArgs)
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