Skip to content

Commit

Permalink
fix some norm error
Browse files Browse the repository at this point in the history
  • Loading branch information
TTENSHII committed Jan 14, 2024
1 parent 26f3ac1 commit 86b9607
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lvtrun/src/Run/Vm.hs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,12 @@ execBrIf cEx@(CurrentExec {ceStack = stack}) =
_ -> throw $ RuntimeError "exec brIf: bad type"

execCall :: VM -> CurrentExec -> FuncIdx -> CurrentExec
execCall vm cEx funcIdx = do
let newVm = execFunctionWithIdx vm funcIdx (ceStack cEx)
let newStack = pushResults (ceStack cEx) (vmStack newVm) (ceResults (currentExec newVm))
cEx { ceStack = newStack }
execCall vm cEx funcIdx = cEx { ceStack = newStack }

Check warning on line 98 in lvtrun/src/Run/Vm.hs

View workflow job for this annotation

GitHub Actions / compil-windows

This binding for `funcIdx' shadows the existing binding

Check warning on line 98 in lvtrun/src/Run/Vm.hs

View workflow job for this annotation

GitHub Actions / compil-macos

This binding for ‘funcIdx’ shadows the existing binding

Check warning on line 98 in lvtrun/src/Run/Vm.hs

View workflow job for this annotation

GitHub Actions / tests

This binding for ‘funcIdx’ shadows the existing binding

Check warning on line 98 in lvtrun/src/Run/Vm.hs

View workflow job for this annotation

GitHub Actions / compil-linux

This binding for ‘funcIdx’ shadows the existing binding
where
newVm = execFunctionWithIdx vm funcIdx currentStack
newStack = pushResults currentStack (vmStack newVm) res
currentStack = ceStack cEx
res = ceResults (currentExec newVm)

execIf :: CurrentExec -> CurrentExec
execIf cEx@(CurrentExec {ceStack = stack}) = case stackTop stack of
Expand Down

0 comments on commit 86b9607

Please sign in to comment.