Skip to content
Snippets Groups Projects
Commit 99ecf1d7 authored by Manos Koukoutos's avatar Manos Koukoutos
Browse files

Treat Forall in instantiateType

parent c1948be1
No related branches found
No related tags found
No related merge requests found
......@@ -300,6 +300,14 @@ object TypeOps {
val mapping = args.map(_.id) zip newArgs.map(_.id)
Lambda(newArgs, rec(idsMap ++ mapping)(body)).copiedFrom(l)
case f @ Forall(args, body) =>
val newArgs = args.map { arg =>
val tpe = tpeSub(arg.getType)
ValDef(freshId(arg.id, tpe))
}
val mapping = args.map(_.id) zip newArgs.map(_.id)
Forall(newArgs, rec(idsMap ++ mapping)(body)).copiedFrom(f)
case p @ Passes(in, out, cases) =>
val (newIn, newCases) = onMatchLike(in, cases)
passes(newIn, srec(out), newCases).copiedFrom(p)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment