Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Disable comparison of dataness/trackedness in NT unification" #884

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion grammars/silver/compiler/definition/type/Unification.sv
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ top::Type ::= fn::String ks::[Kind] data::Boolean tracked::Boolean
top.unify =
case top.unifyWith of
| nonterminalType(ofn, oks, odata, otracked) ->
if fn == ofn --&& data == odata && tracked == otracked -- Mismatched data/tractness can happen when comparing interface files
if fn == ofn && data == odata && tracked == otracked -- Mismatched data/tractness can happen when comparing interface files
then if ks == oks
then emptySubst()
else error("kind mismatch during unification for " ++ prettyType(^top) ++ " and " ++ prettyType(top.unifyWith)) -- Should be impossible
Expand Down
4 changes: 2 additions & 2 deletions grammars/silver/compiler/extension/rewriting/Rewriting.sv
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ top::Expr ::= 'traverse' n::QName '(' es::AppExprs ',' anns::AnnoAppExprs ')'

local numChildren::Integer = n.lookupValue.typeScheme.arity;
local annotations::[String] = map(fst, n.lookupValue.typeScheme.typerep.namedTypes);
es.appExprTypereps = repeat(nonterminalType("silver:rewrite:Strategy", [], false, false), numChildren);
es.appExprTypereps = repeat(nonterminalType("silver:rewrite:Strategy", [], false, true), numChildren);
es.appExprApplied = n.unparse;
es.decSiteVertexInfo = nothing();
es.dispatchFlowDeps = [];
es.appProd = nothing();
es.appIndexOffset = 0;
anns.appExprApplied = n.unparse;
anns.funcAnnotations =
map(pair(fst=_, snd=nonterminalType("silver:rewrite:Strategy", [], false, false)), annotations);
map(pair(fst=_, snd=nonterminalType("silver:rewrite:Strategy", [], false, true)), annotations);
anns.remainingFuncAnnotations = anns.funcAnnotations;

local localErrors::[Message] =
Expand Down