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

Added utility for changing a program's context

parent 2628128f
No related branches found
No related tags found
No related merge requests found
......@@ -47,4 +47,10 @@ trait Program { self =>
val symbols = self.symbols.withADTs(adts)
val ctx = self.ctx
}
def withContext(nctx: Context): Program { val trees: self.trees.type; val symbols: self.symbols.type } = new Program {
val trees: self.trees.type = self.trees
val symbols: self.symbols.type = self.symbols
val ctx = nctx
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment