@@ -39,10 +39,10 @@ import System.Exit(ExitCode(..))
3939import GF.Infra.UseIO (readBinaryFile ,writeBinaryFile ,ePutStrLn )
4040import GF.Infra.SIO (captureSIO )
4141import GF.Data.Utilities (apSnd ,mapSnd )
42- import qualified PGFService as PS
4342import Data.Version (showVersion )
4443import Paths_gf (getDataDir ,version )
4544import GF.Infra.BuildInfo (buildInfo )
45+ import GF.Server.PGFService
4646import GF.Server.SimpleEditor.Convert (parseModule )
4747import Control.Monad.IO.Class
4848
@@ -53,9 +53,9 @@ server jobs port optroot init execute1 = do
5353 state <- newMVar M. empty
5454 datadir <- getDataDir
5555 let root = maybe (datadir</> " www" ) id optroot
56- cache <- PS. newPGFCache root jobs
56+ cache <- newPGFCache root jobs
5757 setDir root
58- let readNGF = PS. readCachedNGF cache
58+ let readNGF = readCachedNGF cache
5959 state0 <- init readNGF
6060 http_server (execute1 readNGF) state0 state cache root
6161 where
@@ -110,15 +110,15 @@ handle logLn documentroot state0 cache execute stateVar conn = do
110110 " /gfshell" -> addDate (stateful $ inDir command)
111111 " /cloud" -> addDate (stateful $ inDir cloud)
112112 " /parse" -> addDate (parse query)
113- " /version" -> addDate (versionInfo `fmap` PS. listPGFCache cache)
114- " /flush" -> addDate (PS. flushPGFCache cache >> return (ok200 " flushed" ))
113+ " /version" -> addDate (versionInfo `fmap` listPGFCache cache)
114+ " /flush" -> addDate (flushPGFCache cache >> return (ok200 " flushed" ))
115115 ' /' : rpath ->
116116 -- This code runs without mutual exclusion, so it must *not*
117117 -- use/change the cwd. Access files by absolute paths only.
118118 let path = translatePath rpath
119119 in case (takeDirectory path,takeFileName path,takeExtension path) of
120- (_ ,_ ," .pgf" ) -> PS. pgfMain logLn conn cache path rq
121- (_ ,_ ," .ngf" ) -> PS. pgfMain logLn conn cache path rq
120+ (_ ,_ ," .pgf" ) -> pgfMain logLn conn cache path rq
121+ (_ ,_ ," .ngf" ) -> pgfMain logLn conn cache path rq
122122 (dir," grammars.cgi" ,_ ) -> addDate (grammarList dir query)
123123 _ -> serveStaticFile conn rpath path
124124 _ -> addDate (return $ resp400 upath)
0 commit comments