Skip to content

Commit

Permalink
chore: publish v0.3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
matthunz committed Feb 1, 2025
1 parent 11b862c commit 1147609
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ A type-safe and friendly [ECS](https://en.wikipedia.org/wiki/Entity_component_sy
import Control.Arrow ((>>>))
import Data.Aztecs
import qualified Data.Aztecs.Access as A
import Data.Aztecs.Scheduler (Scheduler, Startup, Update, run, schedule)
import qualified Data.Aztecs.System as S

newtype Position = Position Int deriving (Show)
Expand All @@ -39,7 +38,7 @@ instance System IO Movement where
task = S.map (\(Position x :& Velocity v) -> Position (x + v)) >>> S.run print

app :: Scheduler IO
app = schedule @IO @Startup @Setup [] <> schedule @_ @Update @Movement []
app = schedule @_ @Startup @Setup [] <> schedule @_ @Update @Movement []

main :: IO ()
main = run app
Expand Down
2 changes: 1 addition & 1 deletion aztecs.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: aztecs
version: 0.2.0.0
version: 0.3.0.0
license: BSD-3-Clause
license-file: LICENSE
maintainer: [email protected]
Expand Down
3 changes: 1 addition & 2 deletions examples/ECS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module Main where
import Control.Arrow ((>>>))
import Data.Aztecs
import qualified Data.Aztecs.Access as A
import Data.Aztecs.Scheduler (Scheduler, Startup, Update, run, schedule)
import qualified Data.Aztecs.System as S

newtype Position = Position Int deriving (Show)
Expand All @@ -28,7 +27,7 @@ instance System IO Movement where
task = S.map (\(Position x :& Velocity v) -> Position (x + v)) >>> S.run print

app :: Scheduler IO
app = schedule @IO @Startup @Setup [] <> schedule @_ @Update @Movement []
app = schedule @_ @Startup @Setup [] <> schedule @_ @Update @Movement []

main :: IO ()
main = run app
6 changes: 6 additions & 0 deletions src/Data/Aztecs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ module Data.Aztecs
Entity,
(:&) (..),
System (..),
Scheduler,
Startup,
Update,
run,
schedule,
)
where

import Data.Aztecs.Access (Access, runAccess)
import Data.Aztecs.Component (Component (..))
import Data.Aztecs.Entity (Entity, EntityID, (:&) (..))
import Data.Aztecs.Scheduler (Scheduler, Startup, Update, run, schedule)
import Data.Aztecs.System (System (..))

0 comments on commit 1147609

Please sign in to comment.