{"id":21027323,"url":"https://github.com/bynect/algorithm-w","last_synced_at":"2025-10-20T04:22:23.807Z","repository":{"id":107042475,"uuid":"398592182","full_name":"bynect/algorithm-w","owner":"bynect","description":"Type inference implementation in OCaml using Algorithm W","archived":false,"fork":false,"pushed_at":"2021-08-26T10:27:28.000Z","size":60,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T07:11:11.502Z","etag":null,"topics":["functional-language","functional-programming","hindley-milner","ocaml","type-inference","type-system"],"latest_commit_sha":null,"homepage":"","language":"OCaml","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/bynect.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2021-08-21T15:27:28.000Z","updated_at":"2025-02-02T14:28:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"2ffc54b2-bcbe-472c-acdc-e8f6956ad11d","html_url":"https://github.com/bynect/algorithm-w","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bynect%2Falgorithm-w","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bynect%2Falgorithm-w/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bynect%2Falgorithm-w/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bynect%2Falgorithm-w/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bynect","download_url":"https://codeload.github.com/bynect/algorithm-w/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565671,"owners_count":21125537,"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":["functional-language","functional-programming","hindley-milner","ocaml","type-inference","type-system"],"created_at":"2024-11-19T11:49:29.594Z","updated_at":"2025-10-20T04:22:23.722Z","avatar_url":"https://github.com/bynect.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Algorithm W implementation\n\nThe implementation is based on the paper [Algorithm W Step by Step][algo-w],\nwith the addition of n-tuples, custom operators and if expressions.\n\n## Grammar\n\n```txt\nexp ::= x                           -- variable\n      | exp exp                     -- application\n      | exp `x` exp                 -- infix application\n      | exp op exp                  -- infix operation\n      | fun x0...xn -\u003e exp          -- anonymous function\n      | let x = exp in exp          -- let binding\n      | if exp then exp else exp    -- if expression\n      | exp, exp                    -- tuple\n      | i                           -- int literal\n      | b                           -- bool literal\n      | exp :: ty                   -- type annotation\n\nty  ::= a0...an\n      | int\n      | bool\n      | unit\n      | ty -\u003e ty\n      | ty * ty\n```\n\n## References\n\n* [Algorithm W Step by Step][algo-w]: Original paper\n* [Write you an inference in F#][fsharp]: Various type inference algorithm implemented in F#\n\n[algo-w]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.65.7733\u0026rep=rep1\u0026type=pdf\n[fsharp]: https://github.com/7sharp9/write-you-an-inference-in-fsharp\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbynect%2Falgorithm-w","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbynect%2Falgorithm-w","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbynect%2Falgorithm-w/lists"}