Skip to content
Snippets Groups Projects
Commit 52242199 authored by Nicolas Voirol's avatar Nicolas Voirol
Browse files

Small fix in determining lambda normal form during template generation

parent ad497372
No related branches found
No related tags found
No related merge requests found
...@@ -287,14 +287,16 @@ trait TemplateGenerator { self: Templates => ...@@ -287,14 +287,16 @@ trait TemplateGenerator { self: Templates =>
case _ => (Seq.empty, e) case _ => (Seq.empty, e)
} }
!l.getType.isInstanceOf[FunctionType] && (extractBody(struct) match { extractBody(struct) match {
case (params, ApplicationExtractor(caller: Variable, args)) => case (params, app @ ApplicationExtractor(caller: Variable, args)) =>
(params.map(_.toVariable) == args) && (deps.get(caller) match { !app.getType.isInstanceOf[FunctionType] &&
(params.map(_.toVariable) == args) &&
(deps.get(caller) match {
case Some(_: Application | _: FunctionInvocation | _: Variable) => true case Some(_: Application | _: FunctionInvocation | _: Variable) => true
case _ => false case _ => false
}) })
case _ => false case _ => false
}) }
} }
val depsByScope: Seq[(Variable, Expr)] = { val depsByScope: Seq[(Variable, Expr)] = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment