Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz committed Dec 10, 2023
1 parent 5304d53 commit 0cd5c91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Juvix/Compiler/Asm/Pretty/Base.hs
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,10 @@ instance (PrettyCode a) => PrettyCode [a] where

instance PrettyCode FunctionInfo where
ppCode FunctionInfo {..} = do
argtys <- mapM ppCode (typeArgs _functionType)
argtys <- mapM ppCode (take _functionArgsNum (typeArgs _functionType))
let argnames = map (fmap variable) _functionArgNames
args = zipWithExact (\mn ty -> maybe mempty (\n -> n <+> colon <> space) mn <> ty) argnames argtys
targetty <- ppCode (typeTarget _functionType)
targetty <- ppCode (if _functionArgsNum == 0 then _functionType else typeTarget _functionType)
c <- ppCodeCode _functionCode
return $
keyword Str.function
Expand Down

0 comments on commit 0cd5c91

Please sign in to comment.