mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-21 09:02:50 -06:00
Better debugging output when SRG generation crashes because of a missing category.
This commit is contained in:
@@ -185,7 +185,9 @@ ungroupTokens = joinRE . mapRE (symbol (RESymbol . Cat) (REConcat . map (RESymbo
|
|||||||
--
|
--
|
||||||
|
|
||||||
lookupFM_ :: (Ord key, Show key) => Map key elt -> key -> elt
|
lookupFM_ :: (Ord key, Show key) => Map key elt -> key -> elt
|
||||||
lookupFM_ fm k = Map.findWithDefault (error $ "Key not found: " ++ show k) k fm
|
lookupFM_ fm k = Map.findWithDefault err k fm
|
||||||
|
where err = error $ "Key not found: " ++ show k
|
||||||
|
++ "\namong " ++ show (Map.keys fm)
|
||||||
|
|
||||||
prtS :: Print a => a -> ShowS
|
prtS :: Print a => a -> ShowS
|
||||||
prtS = showString . prt
|
prtS = showString . prt
|
||||||
Reference in New Issue
Block a user