@@ -18,7 +18,7 @@ module Servant.Utils.StaticFiles
1818import Data.ByteString (ByteString)
1919import Network.Wai.Application.Static
2020import Servant.API.Raw (Raw)
21−import Servant.Server (Server, Tagged (..))
21+import Servant.Server (ServerT, Tagged (..))
2222import System.FilePath (addTrailingPathSeparator)
2323#if !MIN_VERSION_wai_app_static(3,1,0)
2424import Filesystem.Path.CurrentOS (decodeString)
@@ -47,33 +47,33 @@ import WaiAppStatic.Storage.Filesystem (ETagLookup)
4747-- in order.
4848--
4949-- Corresponds to the `defaultWebAppSettings` `StaticSettings` value.
50−serveDirectoryWebApp :: FilePath -> Server Raw
50+serveDirectoryWebApp :: FilePath -> ServerT Raw m
5151serveDirectoryWebApp = serveDirectoryWith . defaultWebAppSettings . fixPath
5252
5353-- | Same as 'serveDirectoryWebApp', but uses `defaultFileServerSettings`.
54−serveDirectoryFileServer :: FilePath -> Server Raw
54+serveDirectoryFileServer :: FilePath -> ServerT Raw m
5555serveDirectoryFileServer = serveDirectoryWith . defaultFileServerSettings . fixPath
5656
5757-- | Same as 'serveDirectoryWebApp', but uses 'webAppSettingsWithLookup'.
58−serveDirectoryWebAppLookup :: ETagLookup -> FilePath -> Server Raw
58+serveDirectoryWebAppLookup :: ETagLookup -> FilePath -> ServerT Raw m
5959serveDirectoryWebAppLookup etag =
6060 serveDirectoryWith . flip webAppSettingsWithLookup etag . fixPath
6161
6262-- | Uses 'embeddedSettings'.
63−serveDirectoryEmbedded :: [(FilePath, ByteString)] -> Server Raw
63+serveDirectoryEmbedded :: [(FilePath, ByteString)] -> ServerT Raw m
6464serveDirectoryEmbedded files = serveDirectoryWith (embeddedSettings files)
6565
6666-- | Alias for 'staticApp'. Lets you serve a directory
6767-- with arbitrary 'StaticSettings'. Useful when you want
6868-- particular settings not covered by the four other
6969-- variants. This is the most flexible method.
70−serveDirectoryWith :: StaticSettings -> Server Raw
70+serveDirectoryWith :: StaticSettings -> ServerT Raw m
7171serveDirectoryWith = Tagged . staticApp
7272
7373-- | Same as 'serveDirectoryFileServer'. It used to be the only
7474-- file serving function in servant pre-0.10 and will be kept
7575-- around for a few versions, but is deprecated.
76−serveDirectory :: FilePath -> Server Raw
76+serveDirectory :: FilePath -> ServerT Raw m
7777serveDirectory = serveDirectoryFileServer
7878{-# DEPRECATED serveDirectory "Use serveDirectoryFileServer instead" #-}
7979