{"id":21940262,"url":"https://github.com/aneeshdurg/lambda","last_synced_at":"2025-03-22T15:13:54.023Z","repository":{"id":123412614,"uuid":"92759028","full_name":"aneeshdurg/lambda","owner":"aneeshdurg","description":"A simple lambda calculus interpreter","archived":false,"fork":false,"pushed_at":"2017-06-08T22:15:32.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-27T14:54:05.248Z","etag":null,"topics":["haskell","interpreter","lambda-calculus","parsec"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aneeshdurg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-05-29T16:59:02.000Z","updated_at":"2019-06-03T12:08:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"25499cfc-ca53-4669-bd6b-7f4b39ebb3ea","html_url":"https://github.com/aneeshdurg/lambda","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/aneeshdurg%2Flambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneeshdurg%2Flambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneeshdurg%2Flambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aneeshdurg%2Flambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aneeshdurg","download_url":"https://codeload.github.com/aneeshdurg/lambda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244973775,"owners_count":20541025,"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":["haskell","interpreter","lambda-calculus","parsec"],"created_at":"2024-11-29T02:30:04.429Z","updated_at":"2025-03-22T15:13:54.004Z","avatar_url":"https://github.com/aneeshdurg.png","language":"Haskell","readme":"# lambda\nA simple lambda calculus interpreter\n\nIn the interest of saving time and effort I lifted a lot of template code from MP6 of cs421 - write a scheme interpreter. You might find a lot of comments pertaining to the assignment, that are irrelevent to this project. I am working on removing those, but am more interesting in getting this to work well first.\n\n### Usage\n\nIf you haven't installed stack:\n```bash\ncurl -sSL https://get.haskellstack.org/ | sh\n```\nAfter you have stack,\n```bash\nstack init\n```\n\nTo run either use `stack build` to generate binaries or `stack repl` and type `main`.\n\n### Syntax\n#### Function application:\n* function and arugments seperated by a space.\n* functions will assume that all items to the left are arguments unless they are specified with parens or it encounters an infix binary operation (+*-/\u003e\u003c) \n```haskell\nf x\ng (f x) y\nf x + 1 \n  == (f x) + 1\n```\n#### Lambda functions:\n* denoted by a \\, arguments are seperated by spaces\n* body and arguments delimited by a .\n```haskell\n\\x y.x + y\n\\x.\\y.y x\n(\\x.x x) (\\x.x x)\n```\n#### Variable assignment:\n\n* Variables can only be assigned as a top level expression\n\n```haskell\ny = 1\nx = (\\x.x+y)\ny = 3\nx 2 \n  == 3\ny \n  == 3\n```\n\n#### Numbers and Booleans\n\n* Currently only integers are supported\n\n```haskell\n1, 2, #t, #f\n(\\x . 3 \u003e x) 2\n  == #f\n```\n\n#### Binary Operators\n\n```haskell\n1+2\n  == 3\n5/3\n == 1\n1*1\n  == 1\n1-1\n  == 0\n1 \u003e 1\n  == #t\n1 \u003c 1\n  == #t\n```\n\n### TODO:\n\n* ~~Implement logical operators~~\n* ~~Implement equality operator~~\n* Better show instances for types\n* Tuples\n* Pattern matching\n* User-defined data types\n* Various other things\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faneeshdurg%2Flambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faneeshdurg%2Flambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faneeshdurg%2Flambda/lists"}