{"id":17042571,"url":"https://github.com/carstenkoenig/gadtparser","last_synced_at":"2025-03-23T01:40:41.417Z","repository":{"id":149495950,"uuid":"203785915","full_name":"CarstenKoenig/GadtParser","owner":"CarstenKoenig","description":"parsing GADT-style expression trees","archived":false,"fork":false,"pushed_at":"2019-08-22T12:00:02.000Z","size":24,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T04:46:45.506Z","etag":null,"topics":["doctest","generalized-algebraic-data-type","haskell","megaparsec","parsing"],"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/CarstenKoenig.png","metadata":{"files":{"readme":"README.md","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":"2019-08-22T11:59:33.000Z","updated_at":"2024-04-09T12:10:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"ddf113fb-9ea4-4f41-8d2d-a2051b1b59ee","html_url":"https://github.com/CarstenKoenig/GadtParser","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/CarstenKoenig%2FGadtParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarstenKoenig%2FGadtParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarstenKoenig%2FGadtParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarstenKoenig%2FGadtParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CarstenKoenig","download_url":"https://codeload.github.com/CarstenKoenig/GadtParser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245044494,"owners_count":20551898,"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":["doctest","generalized-algebraic-data-type","haskell","megaparsec","parsing"],"created_at":"2024-10-14T09:17:45.475Z","updated_at":"2025-03-23T01:40:41.388Z","avatar_url":"https://github.com/CarstenKoenig.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GADT Parser\n\nsimple but complete example on how to parse GADT-style expressions\n\n```haskell\ndata Expr (res :: Type) where\n  IntE    :: Int -\u003e Expr Int\n  AddE    :: Expr Int -\u003e Expr Int -\u003e Expr Int\n  BoolE   :: Bool -\u003e Expr Bool\n  IsNullE :: Expr Int -\u003e Expr Bool\n  IfE     :: Expr Bool -\u003e Expr res -\u003e Expr res -\u003e Expr res\n```\n\nusing [Megaparsec](https://www.stackage.org/haddock/lts-14.2/megaparsec-7.0.5/Text-Megaparsec.html)\n\nsee the [GADT-Module](./src/lib/GADT) for details.\n\nThere is also a simple [ADT implementation](./src/lib/ADT) for comparision.\n\n## Build / Run / Test\n\nThis repository uses [hpack](https://hackage.haskell.org/package/hpack) and is tested with [stack](https://docs.haskellstack.org/en/stable/README/).\n\n- Clone this repository\n- `cd` into the project folder\n- run \n  - `stack build` to build\n  - `stack run` to run a simple \"REPL\" for the DSL\n  - `stack test` to run the parser specs and doctests\n  \nI tried to document the modules so `stack haddock --open` should give you a nice\nlooking documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarstenkoenig%2Fgadtparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarstenkoenig%2Fgadtparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarstenkoenig%2Fgadtparser/lists"}