Skip to content

Commit

Permalink
Fix #2011.
Browse files Browse the repository at this point in the history
  • Loading branch information
athas committed Aug 25, 2023
1 parent 42be9c6 commit 6798fb0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Language/Futhark/Interpreter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,9 @@ evalModExp env (ModDecs ds _) = do
Env terms types <- foldM evalDec env ds
-- Remove everything that was present in the original Env.
pure
( Env terms types,
( Env
(terms `M.difference` envTerm env)
(types `M.difference` envType env),
Module $
Env
(terms `M.difference` envTerm env)
Expand Down
9 changes: 9 additions & 0 deletions tests/issue2011.fut
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- ==
-- input {}
-- output { 4u64 }

module mod: {module x: integral} = {
module x = u64
}

def main = u64.i64 4

0 comments on commit 6798fb0

Please sign in to comment.