{"id":19489328,"url":"https://github.com/redprl/stagedtt","last_synced_at":"2025-04-25T18:33:04.066Z","repository":{"id":40356687,"uuid":"491696193","full_name":"RedPRL/stagedtt","owner":"RedPRL","description":"🪆 A Staged Type Theory","archived":false,"fork":false,"pushed_at":"2023-09-04T14:57:39.000Z","size":140,"stargazers_count":35,"open_issues_count":4,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-04T02:21:29.318Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RedPRL.png","metadata":{"files":{"readme":"README.org","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":"2022-05-12T23:26:50.000Z","updated_at":"2025-03-11T15:22:53.000Z","dependencies_parsed_at":"2024-11-21T02:03:38.293Z","dependency_job_id":null,"html_url":"https://github.com/RedPRL/stagedtt","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/RedPRL%2Fstagedtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedPRL%2Fstagedtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedPRL%2Fstagedtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedPRL%2Fstagedtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedPRL","download_url":"https://codeload.github.com/RedPRL/stagedtt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250872447,"owners_count":21500825,"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":[],"created_at":"2024-11-10T21:08:07.666Z","updated_at":"2025-04-25T18:33:04.053Z","avatar_url":"https://github.com/RedPRL.png","language":"OCaml","readme":"* 🪆 Stagedtt\nStagedtt is an experimental implementation of a staged dependent type theory.\n\n⚠ =stagedtt= is currently experimental, and we will break things!\n\n* Installation\nAs =stagedtt= uses [[https://github.com/RedPRL/algaeff][algaeff]] for effects, we will need to use a version\nof the OCaml compiler that supports effects.\nBegin by running the following command:\n#+BEGIN_SRC\n  opam switch create stagedtt 5.0.0+trunk \u0026\u0026 eval $(opam env)\n#+END_SRC\n\nThis will create a new [[https://opam.ocaml.org/doc/FAQ.html#What-is-a-quot-switch-quot][opam switch]] for =stagedtt=.\n\nNext, we will need to add the OCaml 5 alpha repository for =opam=,\nas some packages we need haven't yet released versions that are\ncompatible with OCaml 5. We can do that with the following command:\n#+BEGIN_SRC shell\n  opam repo add alpha git+https://github.com/kit-ty-kate/opam-alpha-repository.git\n#+END_SRC\n\nNext, run the following 2 commands to install =stagedtt=\n\n#+BEGIN_SRC shell\n  opam install . --with-test\n#+END_SRC\n* Usage\nTo run =stagedtt= on a file, we can use the =stagedtt load= command\nlike so:\n#+BEGIN_SRC shell\n  stagedtt load ./examples/demo.stt\n#+END_SRC\n\nAs =stagedtt= is very much under construction, documentation is\ncurrently lacking. Your best bet is to look at the [[https://github.com/RedPRL/stagedtt/tree/main/examples][examples]] folder to see\nhow the language works.\n* Development\nWe use [[https://dune.build/][dune]] as our build tool. After making some changes, simply run\nthe following command to compile the code.\n#+BEGIN_SRC shell\n  dune build\n#+END_SRC\n\nIf you want to run =stagedtt=, the best way to do so is as follows:\n#+BEGIN_SRC shell\n  dune exec stagedtt -- load ./examples/demo.stt\n#+END_SRC\n\nTo run the test suite, we can use the following command:\n#+BEGIN_SRC shell\n  dune build @runtest\n#+END_SRC\n\n=stagedtt= also has a small benchmarking suite. To run it, use the\nfollowing command:\n#+BEGIN_SRC shell\n  dune build @bench\n#+END_SRC\n\n** Editor Tooling\nAs of \u003c2022-05-12 Thu\u003e, the OCaml 5 ecosystem is still somewhat immature, \nso we have to do a bit of footwork to get our tooling installed. The\nfollowing instructions assume that we already have a working =stagedtt=\nswitch set up. Furthermore, we will be installing [[https://github.com/ocaml/merlin][merlin]]. Other tools\nmay have different requirements, but the process should be similar.\n\nFirst, we will need to add some pins for some merlin deps.\n#+BEGIN_SRC shell\n  opam switch add dot-merlin-reader git+https://github.com/ocaml/merlin#500\n#+END_SRC\n\n\nThen, we can install merlin as per usual.\n\n#+BEGIN_SRC shell\n  opam install merlin \n#+END_SRC\n* References\nThis work is inspired by some of the work by András Kovács, namely\n[[https://github.com/AndrasKovacs/smalltt][smalltt]] and [[https://github.com/AndrasKovacs/staged][staged]].\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredprl%2Fstagedtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredprl%2Fstagedtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredprl%2Fstagedtt/lists"}