summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2015-08-28 13:59:43 +0000
committerhallgren <hallgren@chalmers.se>2015-08-28 13:59:43 +0000
commit5bfaf10de597af504e6d2784309e533b09a6451c (patch)
treec0aacba9c492304cb3b0f905aa05bbefa1599d2c /src/server
parentf2952768d578309a8f75c7da417e3602c4d5e9e9 (diff)
Comment out some dead code found with -fwarn-unused-binds
Also fixed some warnings and tightened some imports
Diffstat (limited to 'src/server')
-rw-r--r--src/server/PGFService.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/PGFService.hs b/src/server/PGFService.hs
index 3d9b2838a..5889c07b8 100644
--- a/src/server/PGFService.hs
+++ b/src/server/PGFService.hs
@@ -37,7 +37,7 @@ import Control.Monad
import Control.Monad.State(State,evalState,get,put)
import Control.Monad.Catch(bracket_)
import Data.Char
-import Data.Function (on)
+--import Data.Function (on)
import Data.List (sortBy,intersperse,mapAccumL,nub,isSuffixOf,nubBy)
import qualified Data.Map as Map
import Data.Maybe
@@ -678,7 +678,7 @@ completionInfo pgf token pstate =
Just typ ->
makeObj [ {-"fid".=funid,-} "fun".=cid, "hyps".=hyps', "cat".=cat, "seq".=seq ]
where
- (hyps,cat,es) = PGF.unType typ
+ (hyps,cat,_es) = PGF.unType typ
hyps' = [ PGF.showType [] typ | (_,_,typ) <- hyps ]
Nothing -> makeObj [ "error".=("Function "++show cid++" not found") ] -- shouldn't happen
@@ -948,10 +948,10 @@ instance JSON PGF.BracketedString where
showJSON (PGF.Leaf s) = makeObj ["token".=s]
-- * PGF utilities
-
+{-
cat :: PGF -> Maybe PGF.Type -> PGF.Type
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 input mcat mfrom =
[(from,po,bs) | from <- froms, (po,bs) <- [PGF.parse_ pgf from cat Nothing input]]
@@ -969,7 +969,7 @@ complete' pgf from typ mlimit input =
then (bs, unwords (if null prefix then ws' else ws'++[prefix]), Map.empty)
else (bs, prefix, PGF.getCompletions ps prefix)
where
- order = sortBy (compare `on` map toLower)
+ --order = sortBy (compare `on` map toLower)
tokensAndPrefix :: String -> ([String],String)
tokensAndPrefix s | not (null s) && isSpace (last s) = (ws, "")