[ngrams] don't `crashWith` when pat missing in highlighter

parent 9ca3c95a
...@@ -214,7 +214,8 @@ highlightNgrams ntype table@(NgramsTable {ngrams_repo_elements: elts}) cache@{ p ...@@ -214,7 +214,8 @@ highlightNgrams ntype table@(NgramsTable {ngrams_repo_elements: elts}) cache@{ p
goAcc i acc (pat /\ lpat) = goAcc i acc (pat /\ lpat) =
case lookupRootListWithChildren pat table cache of case lookupRootListWithChildren pat table cache of
Nothing -> Nothing ->
crashWith "highlightNgrams: pattern missing from table" -- crashWith $ "highlightNgrams: pattern [" <> show pat <> "] missing from table: " <> show table
acc
Just ne_list -> Just ne_list ->
let let
(acc0 /\ acc1_2) = splitAcc i acc (acc0 /\ acc1_2) = splitAcc i acc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment