on master help sign in
utf8-string -> text
bd17d89Michael Snoyman
Network/Wai/Handler/DevelServer.hs+3−2
@@ -6,7 +6,8 @@ module Network.Wai.Handler.DevelServer (run, runNoWatch) where
6import Language.Haskell.Interpreter
6import Language.Haskell.Interpreter
7import Network.Wai
7import Network.Wai
8
8
9−import qualified Data.ByteString.Lazy.UTF8 as U
9+import Data.Text.Lazy (pack)
10+import Data.Text.Lazy.Encoding (encodeUtf8)
10import qualified Data.ByteString.Lazy.Char8 as L8
11import qualified Data.ByteString.Lazy.Char8 as L8
11import Network
12import Network
12 ( listenOn, accept, sClose, PortID(PortNumber), Socket
13 ( listenOn, accept, sClose, PortID(PortNumber), Socket
@@ -62,7 +63,7 @@ startApp queue withApp = do
62 onErr :: SomeException -> IO Response
63 onErr :: SomeException -> IO Response
63 onErr e = return
64 onErr e = return
64 $ Response status500 [("Content-Type", "text/plain; charset=utf-8")]
65 $ Response status500 [("Content-Type", "text/plain; charset=utf-8")]
65− $ ResponseLBS $ U.fromString
66+ $ ResponseLBS $ encodeUtf8 $ pack
66 $ "Exception thrown while running application\n\n" ++ show e
67 $ "Exception thrown while running application\n\n" ++ show e
67 void x = x >> return ()
68 void x = x >> return ()
68
69
wai-handler-devel.cabal+8−8
@@ -21,14 +21,14 @@ Source-repository head
21 location: git://github.com/snoyberg/wai-handler-devel.git
21 location: git://github.com/snoyberg/wai-handler-devel.git
22
22
23Library
23Library
24− Build-Depends: base >= 3 && < 5
24+ Build-Depends: base >= 4 && < 5
25− , wai >= 0.2.1 && < 0.3
25+ , wai >= 0.2.1 && < 0.3
26− , wai-extra >= 0.2.3 && < 0.3
26+ , wai-extra >= 0.2.3 && < 0.3
27− , directory >= 1.0 && < 1.2
27+ , directory >= 1.0 && < 1.2
28− , network >= 2.2 && < 2.4
28+ , network >= 2.2 && < 2.4
29− , bytestring >= 0.9 && < 0.10
29+ , bytestring >= 0.9 && < 0.10
30− , hint >= 0.3.2.3 && < 0.4
30+ , hint >= 0.3.2.3 && < 0.4
31− , utf8-string >= 0.3 && < 0.4
31+ , text >= 0.7 && < 0.12
32 Exposed-modules: Network.Wai.Handler.DevelServer
32 Exposed-modules: Network.Wai.Handler.DevelServer
33 ghc-options: -Wall
33 ghc-options: -Wall
34
34