From 5bfaf10de597af504e6d2784309e533b09a6451c Mon Sep 17 00:00:00 2001 From: hallgren Date: Fri, 28 Aug 2015 13:59:43 +0000 Subject: Comment out some dead code found with -fwarn-unused-binds Also fixed some warnings and tightened some imports --- src/example-based/ExampleDemo.hs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/example-based/ExampleDemo.hs') 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 ... -- cgit v1.2.3