forked from gluon-lang/gluon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Do not traverse the replacement type in walk_move_type
When using walk_move_type to instantiate a type such as `State s (a -> b)` where `type State s a = s -> { state: s, value: a }` the default behaviour of walking the replacement type would cause a stack overflow due to: Instantiate: a ==> (a -> b) Walk: (a -> b) Instantiate: a ==> (a -> b) Walk: (a -> b) etc. There are one case when walking the replacement is desired but that is easily fixed by recursively walking the replacement before returning it (which should be more efficient as well).
- Loading branch information
Showing
2 changed files
with
57 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters