mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
Fix build problem in PGFService.hs when configured without c-runtime
This commit is contained in:
@@ -167,15 +167,6 @@ cpgfMain command (pgf,pc) =
|
|||||||
let t = C.readExpr s
|
let t = C.readExpr s
|
||||||
maybe (badRequest "bad tree" s) return t
|
maybe (badRequest "bad tree" s) return t
|
||||||
|
|
||||||
lexer = maybe (return id) lexerfun =<< getInput "lexer"
|
|
||||||
where
|
|
||||||
lexerfun name =
|
|
||||||
case name of
|
|
||||||
"text" -> return (unwords . lexText)
|
|
||||||
"code" -> return (unwords . lexCode)
|
|
||||||
"mixed" -> return (unwords . lexMixed)
|
|
||||||
_ -> throwCGIError 400 "Unknown lexer" ["Unknown lexer: "++name]
|
|
||||||
|
|
||||||
{-
|
{-
|
||||||
instance JSON C.CId where
|
instance JSON C.CId where
|
||||||
readJSON x = readJSON x >>= maybe (fail "Bad language.") return . C.readCId
|
readJSON x = readJSON x >>= maybe (fail "Bad language.") return . C.readCId
|
||||||
@@ -187,6 +178,15 @@ instance JSON C.Expr where
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
lexer = maybe (return id) lexerfun =<< getInput "lexer"
|
||||||
|
where
|
||||||
|
lexerfun name =
|
||||||
|
case name of
|
||||||
|
"text" -> return (unwords . lexText)
|
||||||
|
"code" -> return (unwords . lexCode)
|
||||||
|
"mixed" -> return (unwords . lexMixed)
|
||||||
|
_ -> throwCGIError 400 "Unknown lexer" ["Unknown lexer: "++name]
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- * Haskell run-time functionality
|
-- * Haskell run-time functionality
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user