summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-01-20 17:06:11 +0000
committerhallgren <hallgren@chalmers.se>2014-01-20 17:06:11 +0000
commit9d71ffc831164c7cba260d1bb3f0a968cca8c3e7 (patch)
treed5863a69c8cf55b9ade0a7b8dcd8665afcb1e015 /src/compiler
parent801a20d27ad53b05ef67e540be343dfd2469deb0 (diff)
Optionally include C run-time support
If the C run-time library is compiled and installed on your system, you can now do 'cabal configure -fc-runtime' to get the following extras: + The haskell binding to the C run-time library will be included in the PGF library (so you can import it in Haskell applications). Documentation on the new modules will be included when you run 'cabal haddock'. + The new command 'pgf-shell', implemented on top of haskell binding to the C run-time system. + Three new commands in the web API: c-parse, c-linearize and c-translate. Their interfaces are similar to the corresponding commands without the "c-" prefix, but they should be considered preliminary.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/GF/Infra/BuildInfo.hs3
-rw-r--r--src/compiler/GFServer.hs2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/GF/Infra/BuildInfo.hs b/src/compiler/GF/Infra/BuildInfo.hs
index cba57cf2a..07f5a0bfc 100644
--- a/src/compiler/GF/Infra/BuildInfo.hs
+++ b/src/compiler/GF/Infra/BuildInfo.hs
@@ -19,6 +19,9 @@ buildInfo =
#ifdef NEW_COMP
++" new-comp"
#endif
+#ifdef C_RUNTIME
+ ++" c-runtime"
+#endif
where
details = either (const no_info) info darcs_info
no_info = "No detailed version info available"
diff --git a/src/compiler/GFServer.hs b/src/compiler/GFServer.hs
index c28a99c5e..a81b6b397 100644
--- a/src/compiler/GFServer.hs
+++ b/src/compiler/GFServer.hs
@@ -150,7 +150,7 @@ handle documentroot state0 cache execute1
case (takeDirectory path,takeFileName path,takeExtension path) of
(_ ,_ ,".pgf") -> wrapCGI $ PS.cgiMain' cache path
(dir,"grammars.cgi",_ ) -> grammarList dir (decoded qs)
- (dir ,"exb.fcgi" ,_ ) -> wrapCGI $ ES.cgiMain' root dir cache
+ (dir ,"exb.fcgi" ,_ ) -> wrapCGI $ ES.cgiMain' root dir (fst cache)
_ -> liftIO $ serveStaticFile path
where path = translatePath rpath
_ -> err $ resp400 upath