Skip to content

Commit

Permalink
Restyled by fourmolu
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits committed Nov 14, 2024
1 parent b558b8f commit 46a28b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ module Swarm.Game.Scenario.Topography.Structure.Recognition.Precompute (

import Control.Arrow ((&&&))
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Except (except, runExceptT)
import Data.Hashable (Hashable)
import Data.Map qualified as M
import Data.Maybe (catMaybes, mapMaybe)
Expand All @@ -66,7 +67,6 @@ import Swarm.Game.Universe (Cosmic (..), offsetBy)
import Swarm.Game.World.Coords (coordsToLoc)
import Swarm.Language.Syntax.Direction (AbsoluteDir)
import Swarm.Util (histogram)
import Control.Monad.Trans.Except (runExceptT, except)

-- | Interface that provides monadic access to
-- querying entities at locations.
Expand Down Expand Up @@ -154,7 +154,7 @@ ensureStructureIntact ::
FoundStructure b a ->
s (Maybe StructureIntactnessFailure)
ensureStructureIntact entLoader (FoundStructure (StructureWithGrid _ _ (RowWidth w) grid) upperLeft) = do
result <- runExceptT $ mapM checkLoc $ zip [0::Int ..] allLocPairs
result <- runExceptT $ mapM checkLoc $ zip [0 :: Int ..] allLocPairs
case result of
Right _ -> return Nothing
Left x -> return $ Just x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ data ChunkedRowMatch a e = ChunkedRowMatch
}
deriving (Functor, Generic, ToJSON)

data StructureIntactnessFailure = StructureIntactnessFailure {
failedOnIndex :: Int
data StructureIntactnessFailure = StructureIntactnessFailure
{ failedOnIndex :: Int
, totalSize :: Int
}
deriving (Generic, ToJSON)
Expand Down

0 comments on commit 46a28b4

Please sign in to comment.