{"id":19797118,"url":"https://github.com/joom/direct-reflection-for-free","last_synced_at":"2026-03-19T11:46:39.289Z","repository":{"id":77583477,"uuid":"150820681","full_name":"joom/direct-reflection-for-free","owner":"joom","description":"using Data and Typeable to get a direct reflection system for free, when we're implementing a toy language in Haskell","archived":false,"fork":false,"pushed_at":"2020-02-21T14:59:36.000Z","size":829,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T16:17:17.873Z","etag":null,"topics":["generic-programming","meta-circular","metaprogramming","reflection","type-theory"],"latest_commit_sha":null,"homepage":"","language":"TeX","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/joom.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":"2018-09-29T03:29:28.000Z","updated_at":"2023-06-23T03:58:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"46a547dc-c646-4099-8d66-68714bf7df4b","html_url":"https://github.com/joom/direct-reflection-for-free","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joom/direct-reflection-for-free","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joom%2Fdirect-reflection-for-free","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joom%2Fdirect-reflection-for-free/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joom%2Fdirect-reflection-for-free/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joom%2Fdirect-reflection-for-free/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joom","download_url":"https://codeload.github.com/joom/direct-reflection-for-free/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joom%2Fdirect-reflection-for-free/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30087349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T15:40:14.053Z","status":"ssl_error","status_checked_at":"2026-03-04T15:40:13.655Z","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":["generic-programming","meta-circular","metaprogramming","reflection","type-theory"],"created_at":"2024-11-12T07:23:54.651Z","updated_at":"2026-03-04T17:32:08.576Z","avatar_url":"https://github.com/joom.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Direct Reflection for Free!\n\nDocuments (TeX, slides etc.) for the work on using `Data` and `Typeable` to get a direct reflection system for free, when we're implementing a toy language in Haskell.\n\nSubmitted for the ICFP 2019 Student Research Competition, got 3rd prize in the graduate category. [[pdf]](http://www.cs.princeton.edu/~ckorkut/papers/icfp-src-19-reflection.pdf)\n\nThis repo still contains a lot of broken code, it will eventually get straightened out, I'm still working on a full paper.\n\n## Abstract\n\nHaskell is a popular language for language implementations. However, adding metaprogramming features to a language implemented in Haskell requires a significant amount of boilerplate code. Using Data and Typeable style of generic programming in Haskell, we describe a design pattern that allows automatic derivation of metaprogramming features from your language implementation. If you have evaluation, you can evaluate quasiquoted terms for free. If you have type-checking, you can type-check quasiquoted terms for free. If you have a parser, you can have parser reflection for free. This design pattern is applicable to both untyped and typed languages, and can implement various features of metaprogramming.\n\n## Acknowledgments\n\nI'd like to thank Matt Chan and Gabriel Gonzalez for inspiring the idea of a bridge between Haskell and another language.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoom%2Fdirect-reflection-for-free","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoom%2Fdirect-reflection-for-free","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoom%2Fdirect-reflection-for-free/lists"}