mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-08 20:59:30 -06:00
Revert "Completely remove uses of example-based"
This reverts commit 69cea20dac.
This commit is contained in:
2
.ghci
2
.ghci
@@ -1,2 +1,2 @@
|
|||||||
:set -isrc/compiler -isrc/binary -isrc/runtime/haskell -isrc/server -isrc/server/transfer -idist/build/autogen -idist/build
|
:set -isrc/compiler -isrc/binary -isrc/runtime/haskell -isrc/server -isrc/example-based -isrc/server/transfer -idist/build/autogen -idist/build
|
||||||
:set -fwarn-unused-imports -optP-DSERVER_MODE -optP-DUSE_INTERRUPT -optP-DCC_LAZY -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build/gf/gf-tmp -hidir dist/build/gf/gf-tmp -stubdir dist/build/gf/gf-tmp
|
:set -fwarn-unused-imports -optP-DSERVER_MODE -optP-DUSE_INTERRUPT -optP-DCC_LAZY -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build/gf/gf-tmp -hidir dist/build/gf/gf-tmp -stubdir dist/build/gf/gf-tmp
|
||||||
|
|||||||
4
gf.cabal
4
gf.cabal
@@ -287,7 +287,9 @@ Library
|
|||||||
CGIUtils
|
CGIUtils
|
||||||
Cache
|
Cache
|
||||||
Fold
|
Fold
|
||||||
hs-source-dirs: src/server src/server/transfer
|
ExampleDemo
|
||||||
|
ExampleService
|
||||||
|
hs-source-dirs: src/server src/server/transfer src/example-based
|
||||||
|
|
||||||
if flag(interrupt)
|
if flag(interrupt)
|
||||||
cpp-options: -DUSE_INTERRUPT
|
cpp-options: -DUSE_INTERRUPT
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ import GF.Infra.UseIO(readBinaryFile,writeBinaryFile,ePutStrLn)
|
|||||||
import GF.Infra.SIO(captureSIO)
|
import GF.Infra.SIO(captureSIO)
|
||||||
import GF.Data.Utilities(apSnd,mapSnd)
|
import GF.Data.Utilities(apSnd,mapSnd)
|
||||||
import qualified PGFService as PS
|
import qualified PGFService as PS
|
||||||
|
import qualified ExampleService as ES
|
||||||
import Data.Version(showVersion)
|
import Data.Version(showVersion)
|
||||||
import Paths_gf(getDataDir,version)
|
import Paths_gf(getDataDir,version)
|
||||||
import GF.Infra.BuildInfo (buildInfo)
|
import GF.Infra.BuildInfo (buildInfo)
|
||||||
@@ -170,6 +171,7 @@ handle logLn documentroot state0 cache execute1 stateVar
|
|||||||
(_ ,_ ,".pgf") -> do --debug $ "PGF service: "++path
|
(_ ,_ ,".pgf") -> do --debug $ "PGF service: "++path
|
||||||
wrapCGI $ PS.cgiMain' cache path
|
wrapCGI $ PS.cgiMain' cache path
|
||||||
(dir,"grammars.cgi",_ ) -> grammarList dir (decoded qs)
|
(dir,"grammars.cgi",_ ) -> grammarList dir (decoded qs)
|
||||||
|
(dir ,"exb.fcgi" ,_ ) -> wrapCGI $ ES.cgiMain' root dir (PS.pgfCache cache)
|
||||||
_ -> serveStaticFile rpath path
|
_ -> serveStaticFile rpath path
|
||||||
where path = translatePath rpath
|
where path = translatePath rpath
|
||||||
_ -> return $ resp400 upath
|
_ -> return $ resp400 upath
|
||||||
@@ -207,7 +209,7 @@ handle logLn documentroot state0 cache execute1 stateVar
|
|||||||
((_,(value,_)):qs1,qs2) -> do put_qs (qs1++qs2)
|
((_,(value,_)):qs1,qs2) -> do put_qs (qs1++qs2)
|
||||||
return value
|
return value
|
||||||
_ -> err $ resp400 $ "no "++field++" in request"
|
_ -> err $ resp400 $ "no "++field++" in request"
|
||||||
|
|
||||||
inDir ok = cd =<< look "dir"
|
inDir ok = cd =<< look "dir"
|
||||||
where
|
where
|
||||||
cd ('/':dir@('t':'m':'p':_)) =
|
cd ('/':dir@('t':'m':'p':_)) =
|
||||||
|
|||||||
Reference in New Issue
Block a user