Skip to content

Commit

Permalink
refactor: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
matthunz committed Mar 5, 2025
1 parent 7717b71 commit 021265a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion bench/Bench.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Aztecs.ECS.World
import qualified Aztecs.ECS.World as W
import Control.DeepSeq
import Criterion.Main
import Data.Function
import Data.Functor.Identity
import GHC.Generics

Expand All @@ -20,7 +21,7 @@ newtype Velocity = Velocity Int deriving (Show, Generic, NFData)
instance Component Velocity

query :: Query Position
query = Q.adjust (\(Velocity v) (Position p) -> Position $ p + v) Q.fetch
query = Q.fetch & Q.adjust (\(Velocity v) (Position p) -> Position $ p + v)

run :: Query Position -> World -> [Position]
run q = fst . runIdentity . Q.map q . entities
Expand Down
1 change: 0 additions & 1 deletion src/Aztecs/Camera.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import qualified Aztecs.ECS.Access as A
import qualified Aztecs.ECS.Query.Reader as Q
import qualified Aztecs.ECS.System as S
import Aztecs.Window
import Control.Arrow
import Control.DeepSeq
import GHC.Generics
import Linear
Expand Down
2 changes: 1 addition & 1 deletion src/Aztecs/ECS/System.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ newtype SystemT m a = SystemT
-- @since 0.9
runSystemT :: ReaderT (TVar Entities) m a
}
deriving (Functor, Applicative, Monad, MonadFix)
deriving (Functor, Applicative, Monad)

-- | @since 0.9
instance MonadDynamicSystem (DynamicQueryT STM) System where
Expand Down

0 comments on commit 021265a

Please sign in to comment.