1
0
forked from GitHub/gf-core

Better debugging output when SRG generation crashes because of a missing category.

This commit is contained in:
bringert
2007-03-24 17:26:21 +00:00
parent 2885cfc5ac
commit 61456fd9ca

View File

@@ -185,7 +185,9 @@ ungroupTokens = joinRE . mapRE (symbol (RESymbol . Cat) (REConcat . map (RESymbo
--
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 = showString . prt