Verified Commit 23a3b4af authored by Camil Staps's avatar Camil Staps 🚀

Hide empty unifiers (fixes #225)

parent 7f301bed
Pipeline #37548 passed with stages
in 16 minutes and 44 seconds
......@@ -492,11 +492,13 @@ function getResults(str, libs, include_builtins, include_core, include_apps, pag
if ('required_context' in extra && extra['required_context'].length > 0) {
hidden.push(['Required context', makeRequiredContext(extra['required_context'])]);
}
if ('unifier' in extra &&
(extra['unifier'].left_to_right.length > 0
|| extra['unifier'].right_to_left.length > 0))
hidden.push(['Unifier', makeUnifier(extra['unifier'])]);
if ('unifier' in extra) {
extra['unifier'].left_to_right=extra['unifier'].left_to_right.filter(u => u[0] != u[1]);
extra['unifier'].right_to_left=extra['unifier'].right_to_left.filter(u => u[0] != u[1]);
if (extra['unifier'].left_to_right.length > 0
|| extra['unifier'].right_to_left.length > 0)
hidden.push(['Unifier', makeUnifier(extra['unifier'])]);
var synonyms = extra['unifier'].used_synonyms;
for (var i in synonyms) {
hidden.push(['Used the type synonym <code>' + highlightClean(
......
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