{"id":18695076,"url":"https://github.com/rybla/impe","last_synced_at":"2025-11-08T13:30:32.294Z","repository":{"id":81618177,"uuid":"342327252","full_name":"rybla/impe","owner":"rybla","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-14T20:44:51.000Z","size":153,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T03:20:42.815Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rybla.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","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}},"created_at":"2021-02-25T17:38:06.000Z","updated_at":"2021-03-14T20:44:53.000Z","dependencies_parsed_at":"2023-03-06T01:15:21.662Z","dependency_job_id":null,"html_url":"https://github.com/rybla/impe","commit_stats":null,"previous_names":["rybla/impe"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rybla%2Fimpe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rybla%2Fimpe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rybla%2Fimpe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rybla%2Fimpe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rybla","download_url":"https://codeload.github.com/rybla/impe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239558907,"owners_count":19658927,"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-07T11:13:51.005Z","updated_at":"2025-11-08T13:30:32.263Z","avatar_url":"https://github.com/rybla.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# impe\n\nAn imperative, interpreted, simple, extendible language.\n\n**interpreting** consists of these steps:\n\n1. **parsing**\n2. **typing**\n3. **executing**\n\n## Grammar\n\n\u003c!-- TODO --\u003e\n\n## Tools\n\nThis project demonstrates the following tools:\n\n- [polysemy](https://hackage.haskell.org/package/polysemy)\n- [lens](https://hackage.haskell.org/package/lens)\n- [mtl](https://hackage.haskell.org/package/mtl)\n- [parsec](https://hackage.haskell.org/package/parsec)\n- [optparse-applicative](https://hackage.haskell.org/package/optparse-applicative)\n\n## Features\n\n- mutable variables\n- branching (`if ... then ... else ...`)\n- looping (`while ... do ... `)\n- functions\n  - nested function definitions\n  - nested scope capturing\n- procedures (functions that don't return a value)\n\n\u003c!-- TODO --\u003e\n\n## Motivation\n\n\u003c!-- TODO --\u003e\n\n## Prelude\n\nThe following functions are pre-defined:\n\n```\n_~_  :: (bool) -\u003e bool\n_\u0026\u0026_ :: (bool, bool) -\u003e bool\n_||_ :: (bool, bool) -\u003e bool\nshow_bool :: (bool) -\u003e string\n\n_+_  :: (int, int) -\u003e int\n_-_  :: (int, int) -\u003e int\n_*_  :: (int, int) -\u003e int\n_/_  :: (int, int) -\u003e int\n_^_  :: (int, int) -\u003e int\n_%_  :: (int, int) -\u003e int\n_=_  :: (int, int) -\u003e bool\n_\u003c_  :: (int, int) -\u003e bool\n_\u003c=_ :: (int, int) -\u003e bool\n_\u003e_  :: (int, int) -\u003e bool\n_\u003e=_ :: (int, int) -\u003e bool\nshow_int :: (int) -\u003e string\n\n_\u003c\u003e_  :: (string, string) -\u003e string\nwrite :: (string) -\u003e void\nread  :: () -\u003e string\n```\n\n## To Do\n\n- [x] optimize execution by stopping execution of function once a return has\n      been reached\n- [x] parsing infixed operators\n- [x] `Initialization` grammar construct\n- [x] finish implementing writing to output file (all at once) - rather than\n      handling logs by IO printing, instead tell writer at `startInterpret`'s\n      level\n- [x] finish implementing reading from input file\n- [x] organize imports/exports names\n\n- [x] better organization for executing and parsing primitive functions and\n      variables\n- [x] error(exception) and warning codes (as ADTs)\n- [x] parse config of verbosity\n- [x] customize verbosity of logs throughout program\n- [x] organize effects by newtype-wrapping logs and errors\n- [x] abstract away interpreting programs/instruction/expression somehow\n- [x] Main.Config module for grammar/parsing of command-line options\n- [x] redefine synonyms to use `Member \u003ceffect\u003e r =\u003e Sem r \u003ctype\u003e` rather than\n      explicitly defining a list of effects\n- [x] error on duplicate names in same scope (requires using nested scoping in\n      typechecking, so probably would be a good idea to just make a general data\n      structure to use for both).\n- [x] finish making new modulization for all REPL stuff\n  - grammar\n  - parsing\n  - typing/executing/interpreting\n  - commands\n  - interface\n\n## Experimental\n\n- pointers (perhaps define whole new language for this)\n- better type and execution errors e.g. line numbers and better messages (redue\n  the amount of abstraction for errors and stuff i.e. give message in place for\n  each error)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frybla%2Fimpe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frybla%2Fimpe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frybla%2Fimpe/lists"}