on master help sign in
warp executable compiles
commit78475b00647f9fac499a3f188f2a944a97c022c5 authorMichael Snoyman <michael@snoyman.com> dateThu 30 Dec 2010, 21:40 (16 years ago) parentf94a767
1 file changed+2−1
warp.hs+2−1
warp.hs+2−1
@@ -8,6 +8,7 @@ import System.Environment (getArgs)
88import Data.Text (unpack)
99import Data.Text.Encoding (decodeUtf8With)
1010import Data.Text.Encoding.Error (lenientDecode)
11+import Control.Monad.IO.Class (liftIO)
1112
1213main :: IO ()
1314main = do
@@ -28,7 +29,7 @@ app prefix Request { requestMethod = m, pathInfo = p }
2829 let file = join $ prefix pieces
2930 let ext = reverse $ takeWhile (/= '.') $ reverse file
3031 let ct = getCT ext
31− e <- doesFileExist file
32+ e <- liftIO $ doesFileExist file
3233 -- FIXME check file size
3334 if e
3435 then return $ ResponseFile status200 [("Content-Type", ct)] file