{"id":16947709,"url":"https://github.com/toyboot4e/toy-lib","last_synced_at":"2025-04-11T20:05:52.320Z","repository":{"id":176391997,"uuid":"654799405","full_name":"toyboot4e/toy-lib","owner":"toyboot4e","description":"My Haskell library for AtCoder contests","archived":false,"fork":false,"pushed_at":"2025-02-27T14:04:20.000Z","size":4574,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T20:05:46.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://toyboot4e.github.io/toy-lib/","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toyboot4e.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-MIT","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}},"created_at":"2023-06-17T02:01:43.000Z","updated_at":"2025-02-27T14:04:23.000Z","dependencies_parsed_at":"2023-09-26T16:21:28.595Z","dependency_job_id":"b937a72e-28fe-4d97-ad69-e6867409b17e","html_url":"https://github.com/toyboot4e/toy-lib","commit_stats":null,"previous_names":["toyboot4e/toy-lib"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toyboot4e%2Ftoy-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toyboot4e%2Ftoy-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toyboot4e%2Ftoy-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toyboot4e%2Ftoy-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toyboot4e","download_url":"https://codeload.github.com/toyboot4e/toy-lib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248473127,"owners_count":21109628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-13T21:48:06.130Z","updated_at":"2025-04-11T20:05:52.298Z","avatar_url":"https://github.com/toyboot4e.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ToyLib\n\nToyLib is my Haskell library for solving AtCoder problems.\n\n[Documentation](https://toyboot4e.github.io/toy-lib/)\n\n## CLI\n\n`toy-lib-exe` is the source file bunlder.\n\n### Usage\n\nGenerate a template that bundles all the source files:\n\n```sh\n$ cabal run toy-lib-exe \u003e template.hs\n```\n\nMinify the toy-lib modules and their dependencies into one line:\n\n```sh\n$ cabal run toy-lib-exe -m Data.Graph.Sparse Data.UnionFind.Mutable\n```\n\nEmbed toy-lib modules:\n\n```sh\n$ cat Example.hs\n-- {{{ toy-lib import\nimport Math.Manhattan\n-- }}} toy-lib import\n\n$ cabal run toy-lib-exe -e Examle.hs\nrot45 :: (Int, Int) -\u003e (Int, Int);rot45 (!x, !y) = (x - y, x + y)\n```\n\n## Project setting notes\n\n### Installation\n\nAs of 2024, AtCoder is using GHC 9.4.5 (Source: [AtCoder judge environment 2023](https://img.atcoder.jp/file/language-update/language-list.html), [the spreadsheet](https://docs.google.com/spreadsheets/d/1HXyOXt5bKwhKWXruzUvfMFHQtBxfZQ0047W7VVObnXI/edit#gid=408033513\u0026range=F38)), which roughly corresponds to [lts-21.7](https://www.stackage.org/lts-21.7)).\n\nI'm using GHC 9.4.6 in this repository for using recent version of HLS. See also: [GHC version support](https://haskell-language-server.readthedocs.io/en/latest/support/ghc-version-support.html).\n\n### `toy-lib.cabal`\n\nNo exports are assumed, as they're bundled into one file (`Main.hs`):\n\n```yaml\nghc-options:\n- -Wno-missing-export-lists\n```\n\nWe're using `Haskell2010` because `haskell-src-exts` (the parser) does not understand `GHC2021`, but all the extensions enabled by it are enabled as `default-extensisons`:\n\n```yaml\ndefault-language: Haskell2010\n\ndefault-extensions:\n- BangPatterns\n# and lots more\n```\n\n### `doctest`\n\nRun [`doctest`] via REPL:\n\n```sh\n$ cabal repl --with-ghc=doctest --repl-options='-w -Wdefault'\n```\n\n[`doctest`]: https://github.com/sol/doctest\n\n### `haddock`\n\nRun [`haddock`] from command line:\n\n```sh\n$ cabal haddock\n$ cabal haddock --open\n```\n\n### Limitations\n\nWe have limitations coming from [haskell-src-exts](https://github.com/haskell-suite/haskell-src-exts):\n\n- Can't use `MultiWayIf`  \n  `haskell-src-exts` does not understand it well.\n\n- Can't use `GHC2021` syntax  \n  For example `import X qualified as Y` is not available.\n\n## Similar repositories\n\n- [cojna/iota](https://github.com/cojna/iota)\n  iota is surely the best resource!\n- [meooow25/haccepted](https://github.com/meooow25/haccepted)\n  Beautiful library compatible with Codeforces.\n- [minoki/my-atcoder-solutions](https://github.com/minoki/my-atcoder-solutions)\n  Solutions to EDPC and more.\n- [unnohideyuki/AtHaskell](https://github.com/unnohideyuki/AtHaskell)\n- [mizunashi-mana/haskell-atcoder-template](https://github.com/mizunashi-mana/haskell-atcoder-template)\n\n[`haddock`]: https://haskell-haddock.readthedocs.io/en/latest/index.html\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoyboot4e%2Ftoy-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoyboot4e%2Ftoy-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoyboot4e%2Ftoy-lib/lists"}