Hlint cleanup
This commit is contained in:
@@ -23,7 +23,7 @@ makeIntInterval x y
|
||||
|
||||
makeInt2Interval :: Int2 -> Int2 -> [Int2]
|
||||
makeInt2Interval (V2 x1 y1) (V2 x2 y2)
|
||||
= [(V2 x y) | x <- makeIntInterval x1 x2, y <- makeIntInterval y1 y2]
|
||||
= [V2 x y | x <- makeIntInterval x1 x2, y <- makeIntInterval y1 y2]
|
||||
|
||||
zoneOfPoint' :: Float -> Point2 -> Int2
|
||||
zoneOfPoint' s = fmap (divTo s)
|
||||
@@ -35,7 +35,7 @@ zoneExtract :: Monoid m => Int2 -> IM.IntMap (IM.IntMap m) -> m
|
||||
zoneExtract (V2 x y) = fromMaybe mempty . (^? ix x . ix y)
|
||||
--
|
||||
zonesExtract :: Monoid m => IM.IntMap (IM.IntMap m) -> [Int2] -> m
|
||||
zonesExtract im = foldMap (flip zoneExtract im)
|
||||
zonesExtract im = foldMap (`zoneExtract` im)
|
||||
|
||||
xIntercepts' :: Float -> Point2 -> Point2 -> [Point2]
|
||||
{-# INLINE xIntercepts' #-}
|
||||
|
||||
@@ -36,7 +36,7 @@ zoneOfCr :: Creature -> [Int2]
|
||||
zoneOfCr cr = zoneOfCirc crZoneSize (_crPos cr) (_crRad cr)
|
||||
|
||||
minCrIXOn :: Ord a => (Creature -> a) -> IS.IntSet -> World -> Maybe Creature
|
||||
minCrIXOn f is w = fmap fst $ IS.foldl' g Nothing is
|
||||
minCrIXOn f is w = fst <$> IS.foldl' g Nothing is
|
||||
where
|
||||
g mcrx cid = minOn snd <$> getpair cid <*> mcrx
|
||||
getpair cid = fmap h $ w ^? creatures . ix cid
|
||||
|
||||
Reference in New Issue
Block a user