diff options
| author | hallgren <hallgren@chalmers.se> | 2015-08-28 13:59:43 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2015-08-28 13:59:43 +0000 |
| commit | 5bfaf10de597af504e6d2784309e533b09a6451c (patch) | |
| tree | c0aacba9c492304cb3b0f905aa05bbefa1599d2c /src/example-based | |
| parent | f2952768d578309a8f75c7da417e3602c4d5e9e9 (diff) | |
Comment out some dead code found with -fwarn-unused-binds
Also fixed some warnings and tightened some imports
Diffstat (limited to 'src/example-based')
| -rw-r--r-- | src/example-based/ExampleDemo.hs | 18 | ||||
| -rw-r--r-- | src/example-based/ExampleService.hs | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/example-based/ExampleDemo.hs b/src/example-based/ExampleDemo.hs index 7b411001b..fe4eb501d 100644 --- a/src/example-based/ExampleDemo.hs +++ b/src/example-based/ExampleDemo.hs @@ -92,7 +92,7 @@ llin :: Environ -> Expr -> Expr llin env expr = let (id,args) = fromJust $ unApp expr - cexpr = fromJust $ Map.lookup id (getConcMap env) + --cexpr = fromJust $ Map.lookup id (getConcMap env) in if any isMeta args then let @@ -170,7 +170,7 @@ embedInStart fss cs = ----------------------------------------------- - +{- updateConcMap :: Environ -> MyFunc -> Expr -> Environ updateConcMap env myf expr = Env (getTypeMap env) (Map.insert myf expr (getConcMap env)) (getSigs env) (getAll env) @@ -196,14 +196,14 @@ updateEnv env myf myt expr = newInterInstr = maybe (Map.insert myt [myf] ii) (\x -> Map.insert myt (myf:x) ii) $ Map.lookup myt ii in Env (getTypeMap env) (Map.insert nn expr (getConcMap env)) newInterInstr (getAll env) - +-} mkSigs :: [FuncWithArg] -> Map.Map MyType [FuncWithArg] mkSigs fss = Map.fromListWith (++) $ zip (map getType fss) (map (\x -> [x]) fss) ------------------------------------- +{------------------------------------ lang :: String lang = "Eng" @@ -214,7 +214,7 @@ parseLang = fromJust $ readLanguage "ParseEng" parsePGFfile :: String parsePGFfile = "ParseEngAbs.pgf" ------------------------------------- +------------------------------------} @@ -307,7 +307,7 @@ debugReplaceConc expr i e = in (mkApp cid (map fst repargs), or $ map snd repargs)) $ unApp e_ - +{- -- replaceArgs : Original expression to parse (from abstract syntax) -> Concrete expression (parsed) replaceArgs :: Expr -> Expr -> Environ -> Maybe Expr replaceArgs aexpr cexpr env = @@ -352,7 +352,7 @@ simpleReplace :: String -> String simpleReplace [] = [] simpleReplace ('?':xs) = 'o' : simpleReplace xs simpleReplace (x:xs) = x : simpleReplace xs - +-} isMeta :: Expr -> Bool isMeta = isJust.unMeta @@ -368,12 +368,12 @@ mkFuncWithArg ((c1,c2),cids) = FuncWithArg c1 c2 cids initial :: TypeMap -> ConcMap -> [FuncWithArg] -> [FuncWithArg] -> Environ initial tm cm fss allfs = Env tm cm (mkSigs fss) allfs - +{- testInit :: [FuncWithArg] -> Environ testInit allfs = initial lTypes Map.empty [] allfs lTypes = Map.fromList [(mkCId "Comment", mkCId "S"),(mkCId "Item", mkCId "NP"), (mkCId "Kind", mkCId "CN"), (mkCId "Quality", mkCId "AP")] - +-} startCateg = mkCId "Comment" -- question about either to give the startcat or not ... diff --git a/src/example-based/ExampleService.hs b/src/example-based/ExampleService.hs index 28d3731d4..e6312bf96 100644 --- a/src/example-based/ExampleService.hs +++ b/src/example-based/ExampleService.hs @@ -71,11 +71,11 @@ doTestFunction cwd cache environ = getCId :: String -> CGI CId getCId name = maybe err return =<< fmap readCId (getInp name) where err = throwCGIError 400 ("Bad "++name) [] - +{- getLimit :: CGI Int getLimit = maybe err return =<< readInput "limit" where err = throwCGIError 400 "Missing/bad limit" [] - +-} readParsePGF cwd cache = do parsepgf <- getInp "parser" |
