forked from GitHub/gf-core
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
|
||||
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
|
||||
readJSON x = readJSON x >>= maybe (fail "Bad language.") return . C.readCId
|
||||
@@ -187,6 +178,15 @@ instance JSON C.Expr where
|
||||
|
||||
#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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user