{"id":18763152,"url":"https://github.com/simre1/haskell-worlds","last_synced_at":"2026-06-24T06:34:03.903Z","repository":{"id":136854489,"uuid":"317058850","full_name":"Simre1/haskell-worlds","owner":"Simre1","description":"Another Haskell ECS","archived":false,"fork":false,"pushed_at":"2021-02-08T18:02:22.000Z","size":12,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-20T19:22:57.469Z","etag":null,"topics":["ecs","entity-component-architecture","entity-component-system","haskell"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Simre1.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-29T22:52:29.000Z","updated_at":"2024-02-20T23:46:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"efa6826f-3bed-4a23-94c4-12a4dc500dcf","html_url":"https://github.com/Simre1/haskell-worlds","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Simre1/haskell-worlds","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simre1%2Fhaskell-worlds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simre1%2Fhaskell-worlds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simre1%2Fhaskell-worlds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simre1%2Fhaskell-worlds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Simre1","download_url":"https://codeload.github.com/Simre1/haskell-worlds/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simre1%2Fhaskell-worlds/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34720920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ecs","entity-component-architecture","entity-component-system","haskell"],"created_at":"2024-11-07T18:24:54.478Z","updated_at":"2026-06-24T06:34:03.859Z","avatar_url":"https://github.com/Simre1.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Haskell Worlds\n\nHaskell Worlds is an *Entity Component System* (ECS) implemented in Haskell. Design choices have been heavily influenced by *apecs*, but I have tried to create an even more ergonomic interface. The most interesting feature is that you can immediately add new components without any boilerplate. It is also possible to dynamically add more components to a world as the application runs.\n\nHere's an example:\n```haskell\n{-# LANGUAGE TypeApplications #-}\nmodule Main where\n\nimport HWorlds\nimport Control.Monad (replicateM_)\nimport Control.Monad.IO.Class (MonadIO(liftIO))\n\ndata Position = Position Double Double\ndata Velocity = Velocity Double Double\n\nmain :: IO ()\nmain = do\n  positionWorld \u003c- mapWorld @Position\n  velocityWorld \u003c- mapWorld @Velocity\n  entityWorld \u003c- entityWorld\n  let myWorld = mergeWorld positionWorld $ mergeWorld velocityWorld entityWorld\n  runWorldT myWorld $ do\n    initEntity (Position 0 0)\n    initEntity (Position 10 10, Velocity 0 5)\n\n    replicateM_ 10 $ do\n      cmap $ \\(Velocity dx dy) -\u003e Velocity dx (pred dy)\n      cmap $ \\(Position x y, Velocity dx dy) -\u003e Position (dx + x) (dy + y)\n      cmapM_ $ \\(Position x y) -\u003e liftIO $ print (x,y)\n```\n\n## Getting started\n\n*HWorlds* does not require any special build instructions, but you need to use *ghc-8.10*. The following should then work without any issues:\n```bash\ngit clone https://github.com/Simre1/haskell-worlds\ncd haskell-worlds\ncabal build\n```\nYou can now run the example app or a minimal benchmark which compares *apecs* and *haskell-worlds*:\n```haskell \ncabal run app\ncabal run bench\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimre1%2Fhaskell-worlds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimre1%2Fhaskell-worlds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimre1%2Fhaskell-worlds/lists"}