Skip to content

Commit

Permalink
Remove args if calling out from an inner module, not into an outer mo…
Browse files Browse the repository at this point in the history
…dule
  • Loading branch information
anka-213 committed Sep 18, 2024
1 parent 13ccde1 commit 88fac19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Agda2Hs/Compile/Term.hs
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ compileDef f ty args =
-- if the function is called from the same module it's defined in,
-- we drop the module parameters
-- NOTE(flupe): in the future we're not always gonna be erasing module parameters
if mnameToList currentMod `isPrefixOf` mnameToList defMod then do
npars <- size <$> (lookupSection =<< currentModule)
if mnameToList defMod `isPrefixOf` mnameToList currentMod then do
npars <- size <$> lookupSection defMod
let (pars, rest) = splitAt npars args
ty' <- piApplyM ty pars
pure (ty', rest)
Expand Down

0 comments on commit 88fac19

Please sign in to comment.