fix warnings

This commit is contained in:
Rowan Torbitzky-Lane 2025-03-07 01:14:00 -06:00
parent 3cae011dfe
commit adff19b765
2 changed files with 6 additions and 6 deletions

@ -335,7 +335,7 @@ instructionVectorFloatInsertVectorFloat = instructionVectorInsertVector vectorFl
-- |Takes the mean of the top float vector and pushes the rounded float value
-- to the float stack.
instructionVectorFloatMean :: State -> State
instructionVectorFloatMean state@(State {_vectorFloat = [] : vs}) = instructionVectorFuncVectorToPrim float vectorFloat retZero state
instructionVectorFloatMean state@(State {_vectorFloat = [] : _}) = instructionVectorFuncVectorToPrim float vectorFloat retZero state
instructionVectorFloatMean state = instructionVectorFuncVectorToPrim float vectorFloat (\xs -> sum xs / fromIntegral @Int @Double (length xs)) state
-- |Takes the maximum of the top float vector and pushes the float value
@ -413,11 +413,11 @@ instructionVectorFloatAbs = instructionVectorFuncVectorToVector vectorFloat (map
-- |Applies the square function to all indices in an float vector, rounds the result as it moves along.
instructionVectorFloatSquare :: State -> State
instructionVectorFloatSquare = instructionVectorFuncVectorToVector vectorFloat (map (^ 2))
instructionVectorFloatSquare = instructionVectorFuncVectorToVector vectorFloat (map (^ (2 :: Int)))
-- |Applies the cube function to all indices in an float vector, rounds the result as it moves along.
instructionVectorFloatCube :: State -> State
instructionVectorFloatCube = instructionVectorFuncVectorToVector vectorFloat (map (^ 3))
instructionVectorFloatCube = instructionVectorFuncVectorToVector vectorFloat (map (^ (3 :: Int)))
-- |Applies the sqrt function to all indices in an float vector, rounds the result as it moves along.
instructionVectorFloatSqrt :: State -> State

@ -335,7 +335,7 @@ instructionVectorIntInsertVectorInt = instructionVectorInsertVector vectorInt
-- |Takes the mean of the top int vector and pushes the rounded int value
-- to the int stack.
instructionVectorIntMean :: State -> State
instructionVectorIntMean state@(State {_vectorInt = [] : vs}) = instructionVectorFuncVectorToPrim int vectorInt retZero state
instructionVectorIntMean state@(State {_vectorInt = [] : _}) = instructionVectorFuncVectorToPrim int vectorInt retZero state
instructionVectorIntMean state = instructionVectorFuncVectorToPrim int vectorInt (\xs -> round $ sum (map (fromIntegral @Integer @Double) xs) / fromIntegral @Int @Double (length xs)) state
-- |Takes the maximum of the top int vector and pushes the int value
@ -413,11 +413,11 @@ instructionVectorIntAbs = instructionVectorFuncVectorToVector vectorInt (map (ro
-- |Applies the square function to all indices in an int vector, rounds the result as it moves along.
instructionVectorIntSquare :: State -> State
instructionVectorIntSquare = instructionVectorFuncVectorToVector vectorInt (map (round . (^ 2) . fromIntegral @Integer @Double))
instructionVectorIntSquare = instructionVectorFuncVectorToVector vectorInt (map (round . (^ (2 :: Int)) . fromIntegral @Integer @Double))
-- |Applies the cube function to all indices in an int vector, rounds the result as it moves along.
instructionVectorIntCube :: State -> State
instructionVectorIntCube = instructionVectorFuncVectorToVector vectorInt (map (round . (^ 3) . fromIntegral @Integer @Double))
instructionVectorIntCube = instructionVectorFuncVectorToVector vectorInt (map (round . (^ (3 :: Int)) . fromIntegral @Integer @Double))
-- |Applies the sqrt function to all indices in an int vector, rounds the result as it moves along.
instructionVectorIntSqrt :: State -> State