{"id":26364867,"url":"https://github.com/lightandlight/idris-lambda-reflection","last_synced_at":"2026-01-30T14:15:28.710Z","repository":{"id":78647599,"uuid":"135252133","full_name":"LightAndLight/idris-lambda-reflection","owner":"LightAndLight","description":"Reflecting simply-typed lambda calculus into Idris","archived":false,"fork":false,"pushed_at":"2018-05-29T21:42:16.000Z","size":9,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-13T04:42:20.561Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Idris","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/LightAndLight.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,"zenodo":null}},"created_at":"2018-05-29T06:37:31.000Z","updated_at":"2022-02-11T01:38:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"ff71a3d5-d0b6-45ff-a313-ebb466fe5b59","html_url":"https://github.com/LightAndLight/idris-lambda-reflection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LightAndLight/idris-lambda-reflection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LightAndLight%2Fidris-lambda-reflection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LightAndLight%2Fidris-lambda-reflection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LightAndLight%2Fidris-lambda-reflection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LightAndLight%2Fidris-lambda-reflection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LightAndLight","download_url":"https://codeload.github.com/LightAndLight/idris-lambda-reflection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LightAndLight%2Fidris-lambda-reflection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28913936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"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":"2025-03-16T19:28:32.647Z","updated_at":"2026-01-30T14:15:28.705Z","avatar_url":"https://github.com/LightAndLight.png","language":"Idris","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reflecting simply typed lambda calculus into Idris\n--------------------------------------------------\n\n## Runtime Reflection\n\nCulminates in this definition:\n\n```idris\nexample_3 : Maybe (Int -\u003e Int -\u003e Int)\nexample_3 = ofType \"\\\\x : int. \\\\y : int. x\" (TyArr TyInt (TyArr TyInt TyInt))\n```\n\nwhich evaluates to `Just (\\a, b =\u003e a)`\n\nIt says \"This string should express a lambda calculus term of type `Int -\u003e Int -\u003e Int`\".\nIf the term fails to parse or typecheck, `ofType` will return `Nothing`.\n\n## Compile Time Reflection\n\nUsing elaborator reflection, we can parse and typecheck the string at compile\ntime, and build up the corresponding Idris syntax tree. If the Idris function\nhas a type that doesn't match the lambda expression, or the expression fails\nto parse, then an error will be reported.\n\n```idris\ntest1 : (Int -\u003e Int) -\u003e Int -\u003e Int\ntest1 = %runElab (reflect \"\\\\f : int -\u003e int. \\\\x : int. f x\")\n\ntest2 : Int -\u003e Int\ntest2 = %runElab (reflect \"\\\\x : int. x\")\n\ntest3 : Int -\u003e Bool\ntest3 = %runElab (reflect \"\\\\x : int. true\")\n\ntest4 : Bool\ntest4 = %runElab (reflect \"(\\\\x : bool. x) true\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightandlight%2Fidris-lambda-reflection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightandlight%2Fidris-lambda-reflection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightandlight%2Fidris-lambda-reflection/lists"}