{"id":16661264,"url":"https://github.com/snowleopard/cats","last_synced_at":"2026-03-04T14:31:11.216Z","repository":{"id":37892155,"uuid":"170039551","full_name":"snowleopard/cats","owner":"snowleopard","description":"Musings on category theory","archived":false,"fork":false,"pushed_at":"2022-06-24T14:19:12.000Z","size":21,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T19:00:57.618Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/snowleopard.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-10T23:27:33.000Z","updated_at":"2024-11-25T09:07:58.000Z","dependencies_parsed_at":"2022-08-19T19:40:15.299Z","dependency_job_id":null,"html_url":"https://github.com/snowleopard/cats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/snowleopard/cats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowleopard%2Fcats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowleopard%2Fcats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowleopard%2Fcats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowleopard%2Fcats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snowleopard","download_url":"https://codeload.github.com/snowleopard/cats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowleopard%2Fcats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30083738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T13:22:36.021Z","status":"ssl_error","status_checked_at":"2026-03-04T13:20:45.750Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-10-12T10:34:21.373Z","updated_at":"2026-03-04T14:31:10.938Z","avatar_url":"https://github.com/snowleopard.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Musings on category theory\n\n[![Build status](https://img.shields.io/github/workflow/status/snowleopard/cats/ci/master.svg)](https://github.com/snowleopard/cats/actions)\n\nNothing special, just trying to make sense of various papers and ideas involving\nCategory Theory.\n\n## Compiling to Categories\n\nExperimenting with compiling STLC to Closed Cartesian Categories.\nSee Conal Elliott's ICFP'17 paper\n[Compiling to Categories](http://conal.net/papers/compiling-to-categories/compiling-to-categories.pdf).\n\nSource: https://github.com/snowleopard/cats/blob/master/src/CCC.hs.\n\nAn example `ghci` session:\n```haskell\nλ\u003e k = Lam $ Lam $ Var (S Z)\nλ\u003e :t k\nk :: Expr c (a1 -\u003e a2 -\u003e a1)\nλ\u003e :t compile k\ncompile k :: CCC c (a1 -\u003e a2 -\u003e a1)\nλ\u003e pretty (compile k)\n\"curry (curry (snd . fst))\"\n```\n\n## Matrix category\n\nExperimenting with an inductive matrix data type that forms a category.\n\nSource: https://github.com/snowleopard/cats/blob/master/src/Matrix.hs.\n\nAn example `ghci` session:\n```haskell\nλ\u003e m = (singleton 1 ||| singleton 2) \u0026\u0026\u0026 (singleton 3 ||| singleton (4 :: Int))\nλ\u003e dump m\n[1,2]\n[3,4]\nλ\u003e dump (transpose m)\n[1,3]\n[2,4]\nλ\u003e dump (m . transpose m)\n[5,11]\n[11,25]\nλ\u003e dump ((m . transpose m) ||| id)\n[5,11,1,0]\n[11,25,0,1]\nλ\u003e dump $ functionN (\\x y -\u003e bool 0 (1 :: Int) (x || y))\n[0,1]\n[1,1]\nλ\u003e dump $ functionN (\\x y -\u003e x \u0026\u0026 y)\n[False,False]\n[False,True]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowleopard%2Fcats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnowleopard%2Fcats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowleopard%2Fcats/lists"}