diff --git a/CHANGELOG.d/internal_fix-typo-in-traversal.md b/CHANGELOG.d/internal_fix-typo-in-traversal.md new file mode 100644 index 0000000000..98dfa19747 --- /dev/null +++ b/CHANGELOG.d/internal_fix-typo-in-traversal.md @@ -0,0 +1 @@ +* Fix typo in CoreFn.Traversals.traverseCoreFn which caused it to not recurse into Let bodies diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index cfbb98e362..3a4fb44ab8 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -169,6 +169,7 @@ If you would prefer to use different terms, please use the section below instead | [@xgrommx](https://github.com/xgrommx) | Denis Stoyanov | [MIT license] | | [@zudov](https://github.com/zudov) | Konstantin Zudov | [MIT license] | | [@roryc89](https://github.com/roryc89) | Rory Campbell | [MIT license] | +| [@drathier](https://github.com/drathier) | Drathier | [MIT license] | ### Contributors using Modified Terms diff --git a/src/Language/PureScript/CoreFn/Traversals.hs b/src/Language/PureScript/CoreFn/Traversals.hs index f0684d34d5..4b5faa10cd 100644 --- a/src/Language/PureScript/CoreFn/Traversals.hs +++ b/src/Language/PureScript/CoreFn/Traversals.hs @@ -70,7 +70,7 @@ traverseCoreFn f g h i = (f', g', h', i') g' (Abs ann name e) = Abs ann name <$> g e g' (App ann v1 v2) = App ann <$> g v1 <*> g v2 g' (Case ann vs alts) = Case ann <$> traverse g vs <*> traverse i alts - g' (Let ann ds e) = Let ann <$> traverse f ds <*> g' e + g' (Let ann ds e) = Let ann <$> traverse f ds <*> g e g' e = pure e h' (LiteralBinder a b) = LiteralBinder a <$> handleLiteral h b