mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-02 15:52:50 -06:00
drop the haskell runtime, part 2
This commit is contained in:
@@ -9,7 +9,6 @@ import qualified Data.Map as Map
|
||||
import Data.List(nub,mapAccumL)
|
||||
import Data.Maybe(fromMaybe)
|
||||
|
||||
#if C_RUNTIME
|
||||
generateByteCode :: SourceGrammar -> Int -> [L Equation] -> [[Instr]]
|
||||
generateByteCode gr arity eqs =
|
||||
let (bs,instrs) = compileEquations gr arity (arity+1) is
|
||||
@@ -302,7 +301,3 @@ freeVars xs e = collectOp (freeVars xs) e
|
||||
push_is :: Int -> Int -> [IVal] -> [IVal]
|
||||
push_is i 0 is = is
|
||||
push_is i n is = ARG_VAR i : push_is (i-1) (n-1) is
|
||||
|
||||
#else
|
||||
generateByteCode = error "generateByteCode is not implemented"
|
||||
#endif
|
||||
|
||||
@@ -14,9 +14,3 @@ buildInfo =
|
||||
#ifdef SERVER_MODE
|
||||
++" server"
|
||||
#endif
|
||||
#ifdef NEW_COMP
|
||||
++" new-comp"
|
||||
#endif
|
||||
#ifdef C_RUNTIME
|
||||
++" c-runtime"
|
||||
#endif
|
||||
|
||||
@@ -12,9 +12,6 @@ module GF.Infra.SIO(
|
||||
newStdGen,print,putStr,putStrLn,
|
||||
-- ** Specific to GF
|
||||
importGrammar,importSource,
|
||||
#ifdef C_RUNTIME
|
||||
readPGF2,
|
||||
#endif
|
||||
putStrLnFlush,runInterruptibly,lazySIO,
|
||||
-- * Restricted accesss to arbitrary (potentially unsafe) IO operations
|
||||
-- | If the environment variable GF_RESTRICTED is defined, these
|
||||
@@ -39,9 +36,6 @@ import qualified System.Random as IO(newStdGen)
|
||||
import qualified GF.Infra.UseIO as IO(getLibraryDirectory)
|
||||
import qualified GF.System.Signal as IO(runInterruptibly)
|
||||
import qualified GF.Command.Importing as GF(importGrammar, importSource)
|
||||
#ifdef C_RUNTIME
|
||||
import qualified PGF2
|
||||
#endif
|
||||
|
||||
-- * The SIO monad
|
||||
|
||||
@@ -123,7 +117,3 @@ lazySIO = lift1 lazyIO
|
||||
|
||||
importGrammar pgf opts files = lift0 $ GF.importGrammar pgf opts files
|
||||
importSource opts files = lift0 $ GF.importSource opts files
|
||||
|
||||
#ifdef C_RUNTIME
|
||||
readPGF2 = lift0 . PGF2.readPGF
|
||||
#endif
|
||||
|
||||
@@ -179,7 +179,7 @@ handle logLn documentroot state0 cache execute1 stateVar
|
||||
|
||||
translatePath rpath = root</>rpath -- hmm, check for ".."
|
||||
|
||||
versionInfo (c1,c2) =
|
||||
versionInfo c =
|
||||
html200 . unlines $
|
||||
"<!DOCTYPE html>":
|
||||
"<meta name = \"viewport\" content = \"width = device-width\">":
|
||||
@@ -187,8 +187,7 @@ handle logLn documentroot state0 cache execute1 stateVar
|
||||
"":
|
||||
("<h2>"++hdr++"</h2>"):
|
||||
(zipWith (++) ("<p>":repeat "<br>") buildinfo)++
|
||||
sh "Haskell run-time system" c1++
|
||||
sh "C run-time system" c2
|
||||
sh "Run-time system" c
|
||||
where
|
||||
hdr:buildinfo = lines gf_version
|
||||
rel = makeRelative documentroot
|
||||
|
||||
Reference in New Issue
Block a user