Rewrite function bodies if they are only checked once
Description
Problem
We want to rewrite code in the body of functions if they are only checked once (ie., the functions are not of an intersection type that overloads the same arities). Currently, function bodies are not rewritten directly to the respective AST node they originated from, in case they are checked more than once.
Solution
If an arity is checked only once, then associate the result of type checking over the old body. Otherwise, keep the current behaviour.
Pull request: Patch: Commit: Release:
Environment
None
Activity
Show:
Ambrose Bonnaire-Sergeant August 2, 2015 at 7:41 AM
Problem
We want to rewrite code in the body of functions if they are
only checked once (ie., the functions are not of an intersection
type that overloads the same arities). Currently, function bodies
are not rewritten directly to the respective AST node they originated
from, in case they are checked more than once.
Solution
If an arity is checked only once, then associate the result of type
checking over the old body. Otherwise, keep the current behaviour.
Pull request:
Patch:
Commit:
Release: