1
0
forked from GitHub/gf-core

Replace fromJust with fromMaybe + error message when looking up lintype in SimpleToFCFG. This makes problems easier to debug.

This commit is contained in:
bjorn
2008-02-26 14:00:15 +00:00
parent ad785c1bab
commit c430d88a09

View File

@@ -109,7 +109,7 @@ convert abs_defs cnc_defs cat_defs = getFGrammar (loop frulesEnv)
(id, (ty,_)) <- abs_defs, let (args,res) = catSkeleton ty,
term <- Map.lookup id cnc_defs]
findLinType id = fromJust (Map.lookup id cat_defs)
findLinType id = fromMaybe (error $ "No lincat for " ++ show id) (Map.lookup id cat_defs)
(xrulesMap,frulesEnv) = List.foldl' helper (Map.empty,emptyFRulesEnv) srules
where