mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
Make PGFService.hs compile again
+ PGFService.hs: add Nothing arguments in calls to PGF.parse_ and PGF.getPArseOutput + gf-server.cabal: mark content-server as not buildable, since required source files are missing.
This commit is contained in:
@@ -447,7 +447,7 @@ cat pgf mcat = fromMaybe (PGF.startCat pgf) mcat
|
|||||||
|
|
||||||
parse' :: PGF -> String -> Maybe PGF.Type -> Maybe PGF.Language -> [(PGF.Language,PGF.ParseOutput,PGF.BracketedString)]
|
parse' :: PGF -> String -> Maybe PGF.Type -> Maybe PGF.Language -> [(PGF.Language,PGF.ParseOutput,PGF.BracketedString)]
|
||||||
parse' pgf input mcat mfrom =
|
parse' pgf input mcat mfrom =
|
||||||
[(from,po,bs) | from <- froms, (po,bs) <- [PGF.parse_ pgf from cat input]]
|
[(from,po,bs) | from <- froms, (po,bs) <- [PGF.parse_ pgf from cat Nothing input]]
|
||||||
where froms = maybe (PGF.languages pgf) (:[]) mfrom
|
where froms = maybe (PGF.languages pgf) (:[]) mfrom
|
||||||
cat = fromMaybe (PGF.startCat pgf) mcat
|
cat = fromMaybe (PGF.startCat pgf) mcat
|
||||||
|
|
||||||
@@ -457,7 +457,7 @@ complete' pgf from typ mlimit input =
|
|||||||
let (ws,prefix) = tokensAndPrefix input
|
let (ws,prefix) = tokensAndPrefix input
|
||||||
ps0 = PGF.initState pgf from typ
|
ps0 = PGF.initState pgf from typ
|
||||||
(ps,ws') = loop ps0 ws
|
(ps,ws') = loop ps0 ws
|
||||||
bs = snd (PGF.getParseOutput ps typ)
|
bs = snd (PGF.getParseOutput ps typ Nothing)
|
||||||
in if not (null ws')
|
in if not (null ws')
|
||||||
then (bs, unwords (if null prefix then ws' else ws'++[prefix]), [])
|
then (bs, unwords (if null prefix then ws' else ws'++[prefix]), [])
|
||||||
else (bs, prefix, maybe id take mlimit $ order $ Map.keys (PGF.getCompletions ps prefix))
|
else (bs, prefix, maybe id take mlimit $ order $ Map.keys (PGF.getCompletions ps prefix))
|
||||||
|
|||||||
@@ -37,5 +37,6 @@ executable pgf-server
|
|||||||
ghc-options: -optl-mwindows
|
ghc-options: -optl-mwindows
|
||||||
|
|
||||||
executable content-server
|
executable content-server
|
||||||
|
buildable: False
|
||||||
build-depends: base >=4.2 && <5
|
build-depends: base >=4.2 && <5
|
||||||
main-is: ContentService.hs
|
main-is: ContentService.hs
|
||||||
|
|||||||
Reference in New Issue
Block a user