diff --git a/src/Swarm/Game/Step.hs b/src/Swarm/Game/Step.hs index 9a81cd306..dc1db3dbc 100644 --- a/src/Swarm/Game/Step.hs +++ b/src/Swarm/Game/Step.hs @@ -1046,7 +1046,7 @@ execConst c vs s k = do maybeLimit <- if hasLimit then case limitVal of - VInt d -> return $ Just $ fromIntegral d + VInt d -> return $ Just d _ -> badConst else return Nothing goal <- diff --git a/src/Swarm/Game/Step/Pathfinding.hs b/src/Swarm/Game/Step/Pathfinding.hs index 9c4f0f602..15f02f0ce 100644 --- a/src/Swarm/Game/Step/Pathfinding.hs +++ b/src/Swarm/Game/Step/Pathfinding.hs @@ -59,7 +59,7 @@ data PathfindingTarget pathCommand :: (HasRobotStepState sig m, Has (State GameState) sig m) => -- | Distance limit - Maybe Int32 -> + Maybe Integer -> -- | Starting location Cosmic Location -> -- | Search goal @@ -87,7 +87,7 @@ pathCommand maybeLimit (Cosmic currentSubworld robotLoc) target = do (return robotLoc) withinDistanceLimit :: Location -> Bool - withinDistanceLimit = (<= distanceLimit) . manhattan robotLoc + withinDistanceLimit = (<= distanceLimit) . fromIntegral . manhattan robotLoc -- Extracts the head of the found path to determine -- the next direction for the robot to proceed along diff --git a/src/Swarm/Language/Syntax.hs b/src/Swarm/Language/Syntax.hs index 8e7a1497b..970d37567 100644 --- a/src/Swarm/Language/Syntax.hs +++ b/src/Swarm/Language/Syntax.hs @@ -119,7 +119,7 @@ maxScoutRange = 64 maxStrideRange :: Int maxStrideRange = 64 -maxPathRange :: Int32 +maxPathRange :: Integer maxPathRange = 128 ------------------------------------------------------------