{"id":16678549,"url":"https://github.com/brendanzab/elm-stlc","last_synced_at":"2025-04-09T21:33:18.419Z","repository":{"id":66157307,"uuid":"157711144","full_name":"brendanzab/elm-stlc","owner":"brendanzab","description":"Bidirectional type checker for the simply typed lambda calculus","archived":false,"fork":false,"pushed_at":"2020-02-04T04:41:13.000Z","size":16,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T23:27:01.092Z","etag":null,"topics":["bidirectional-typechecking","elm","lambda-calculus","simply-typed-lambda-calculus","type-checking"],"latest_commit_sha":null,"homepage":"https://ellie-app.com/3Wq9nP4zcCva1","language":"Elm","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/brendanzab.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":"2018-11-15T12:54:53.000Z","updated_at":"2025-01-10T01:18:39.000Z","dependencies_parsed_at":"2023-02-21T08:31:18.775Z","dependency_job_id":null,"html_url":"https://github.com/brendanzab/elm-stlc","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/brendanzab%2Felm-stlc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanzab%2Felm-stlc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanzab%2Felm-stlc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendanzab%2Felm-stlc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brendanzab","download_url":"https://codeload.github.com/brendanzab/elm-stlc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248114985,"owners_count":21050150,"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":["bidirectional-typechecking","elm","lambda-calculus","simply-typed-lambda-calculus","type-checking"],"created_at":"2024-10-12T13:29:39.566Z","updated_at":"2025-04-09T21:33:18.401Z","avatar_url":"https://github.com/brendanzab.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elm-stlc\n\nA type checker for the simply typed lambda calculus, implemented in a\nbidirectional style.\n\nThe point of this is to show that type checking is actually quite simple if\nyou follow a bidirectional approach! Hopefully this whets your appetite for\nplaying around with your own type checkers!\n\nThe idea behind bidirectional type checking is that you split up your syntax \ninto terms that are:\n\n- easy to infer the type of\n- need additional type annotations to check them\n\nFor example:\n\n- `'foo` is easy to infer - it's an `Atom`\n- `\\x =\u003e x` can't have its type inferred - it needs an annotation\n\nThis split is reflected in the type checker, which has two mutually defined functions:\n\n```elm\ninfer : Context -\u003e Term -\u003e Result String Type\ncheck : Context -\u003e Term -\u003e Type -\u003e Result String ()\n```\n\n## Running the app\n\nTo play with this, install Elm 0.19, clone the repository, and run the Elm\nReactor:\n\n```\nelm reactor\n```\n\nThen open `src/Main.elm` in the file navigator\n\n## Further reading\n\n- http://www.davidchristiansen.dk/tutorials/bidirectional.pdf\n- http://davidchristiansen.dk/tutorials/nbe/\n- https://www.andres-loeh.de/LambdaPi/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrendanzab%2Felm-stlc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrendanzab%2Felm-stlc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrendanzab%2Felm-stlc/lists"}