Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
athas authored and CKuke committed Nov 8, 2023
1 parent 3500209 commit 69cb419
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

* Lambda lifting in `while` conditions (#2038).

* Size expressions in local function parameters had an interesting
interaction with defunctionalisation (#2040).

## [0.25.6]

### Added
Expand Down
7 changes: 4 additions & 3 deletions src/Futhark/Internalise/Monomorphise.hs
Original file line number Diff line number Diff line change
Expand Up @@ -513,10 +513,11 @@ transformAppExp (LetFun fname (tparams, params, retdecl, Info ret, body) e loc)
let (bs_local, bs_prop) = Seq.partition ((== fname) . fst) bs
pure (unfoldLetFuns (map snd $ toList bs_local) e', const bs_prop)
| otherwise = do
body' <- scoping (S.fromList (foldMap patNames params)) $ transformExp body
ret' <- transformRetTypeSizes (S.fromList (foldMap patNames params)) ret
params' <- mapM transformPat params
body' <- scoping (S.fromList (foldMap patNames params')) $ transformExp body
ret' <- transformRetTypeSizes (S.fromList (foldMap patNames params')) ret
AppExp
<$> ( LetFun fname (tparams, params, retdecl, Info ret', body')
<$> ( LetFun fname (tparams, params', retdecl, Info ret', body')
<$> scoping (S.singleton fname) (transformExp e)
<*> pure loc
)
Expand Down

0 comments on commit 69cb419

Please sign in to comment.