diff options
| author | bjorn <bjorn@bringert.net> | 2008-02-26 14:00:15 +0000 |
|---|---|---|
| committer | bjorn <bjorn@bringert.net> | 2008-02-26 14:00:15 +0000 |
| commit | c430d88a09739f3b78ef9b36ba0236b330611764 (patch) | |
| tree | 2b7cb4d625eb3cab219e24989beab7b77120ebe5 /src/GF/Conversion/SimpleToFCFG.hs | |
| parent | ad785c1bab6a4de12ea31d33f8b536180f21158c (diff) | |
Replace fromJust with fromMaybe + error message when looking up lintype in SimpleToFCFG. This makes problems easier to debug.
Diffstat (limited to 'src/GF/Conversion/SimpleToFCFG.hs')
| -rw-r--r-- | src/GF/Conversion/SimpleToFCFG.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/GF/Conversion/SimpleToFCFG.hs b/src/GF/Conversion/SimpleToFCFG.hs index e6bc5a059..4ff5781f9 100644 --- a/src/GF/Conversion/SimpleToFCFG.hs +++ b/src/GF/Conversion/SimpleToFCFG.hs @@ -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 |
