{"id":16987067,"url":"https://github.com/csabahruska/jhc-components","last_synced_at":"2025-07-13T14:37:32.489Z","repository":{"id":141528276,"uuid":"161830303","full_name":"csabahruska/jhc-components","owner":"csabahruska","description":"JHC Haskell compiler split into reusable components","archived":false,"fork":false,"pushed_at":"2018-12-17T11:48:36.000Z","size":792,"stargazers_count":58,"open_issues_count":0,"forks_count":12,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-18T13:15:28.139Z","etag":null,"topics":["c","c-backend","compiler","functional-programming","grin","haskell","jhc","multiplatform","optimizer"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csabahruska.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":"2018-12-14T19:17:06.000Z","updated_at":"2025-03-13T17:34:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"3fa86521-cc4c-4f78-94c0-74b533d848f6","html_url":"https://github.com/csabahruska/jhc-components","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/csabahruska%2Fjhc-components","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csabahruska%2Fjhc-components/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csabahruska%2Fjhc-components/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csabahruska%2Fjhc-components/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csabahruska","download_url":"https://codeload.github.com/csabahruska/jhc-components/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244978442,"owners_count":20541857,"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":["c","c-backend","compiler","functional-programming","grin","haskell","jhc","multiplatform","optimizer"],"created_at":"2024-10-14T02:48:00.749Z","updated_at":"2025-03-22T15:30:51.512Z","avatar_url":"https://github.com/csabahruska.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JHC Haskell Compiler\n\nThis is a fork of [JHC Haskell Compiler](http://repetae.net/computer/jhc/) 0.8.2.\n\nThe source code is split into reusable components and builds with [Haskell Stack](https://docs.haskellstack.org/en/stable/README/).\n\n### Components\n- `jhc-compat`: Haskell98 compatibility library\n- `jhc-common`: Compiler foundation library\n- `jhc-frontend`: Haskell Front-End, lexer, parser, type-checker\n- `jhc-core`: Core language, based on [Pure Type System](https://en.wikipedia.org/wiki/Pure_type_system)\n- `jhc-grin`: Backend, C code generator, whole program optimizer, variant of GRIN intermediate language\n- `jhc-app`: JHC Compiler, command line interface\n\nNOTE: *lib* contains the standard Haskell libraries for JHC\n\n### System Requirements\n- OS: Windows/Linux/OSX\n- Tools: [Haskell Stack](https://docs.haskellstack.org/en/stable/README/) or [Haskell Cabal](https://www.haskell.org/cabal/)\n\n### Compile \u0026 Run\n\n#### Stack\nThe instructions below are for [Haskell Stack](https://docs.haskellstack.org/en/stable/README/).\n\n```\nstack setup\nstack build\nstack exec -- jhc --help\n```\n\nTo compile the standard libraries run:\n```\nstack exec -- jhc -L . --build-hl  lib/jhc-prim/jhc-prim.yaml\nstack exec -- jhc -L . --build-hl  lib/jhc/jhc.yaml\nstack exec -- jhc -L . --build-hl  lib/haskell-extras/haskell-extras.yaml\nstack exec -- jhc -L . --build-hl  lib/haskell2010/haskell2010.yaml\nstack exec -- jhc -L . --build-hl  lib/haskell98/haskell98.yaml\nstack exec -- jhc -L . --build-hl  lib/applicative/applicative.yaml\nstack exec -- jhc -L . --build-hl  lib/flat-foreign/flat-foreign.yaml\n```\n\nTo compile the examples run:\n```\nstack exec -- jhc -L . examples/Calendar.hs -o calendar\nstack exec -- jhc -L . examples/HelloWorld.hs -o hello\nstack exec -- jhc -L . examples/Primes.hs -o primes\n```\n\n#### Cabal\nThe instructions below are for [Haskell Cabal](https://www.haskell.org/cabal/) version 2.4.1 or later.\n\nTo (re)compile and run `jhc` from within the source-tree, simply invoke\n```\ncabal v2-run jhc -- --help\n```\n\nTo compile the standard libraries run:\n```\ncabal v2-run jhc -- -L . --build-hl  lib/jhc-prim/jhc-prim.yaml\ncabal v2-run jhc -- -L . --build-hl  lib/jhc/jhc.yaml\ncabal v2-run jhc -- -L . --build-hl  lib/haskell-extras/haskell-extras.yaml\ncabal v2-run jhc -- -L . --build-hl  lib/haskell2010/haskell2010.yaml\ncabal v2-run jhc -- -L . --build-hl  lib/haskell98/haskell98.yaml\ncabal v2-run jhc -- -L . --build-hl  lib/applicative/applicative.yaml\ncabal v2-run jhc -- -L . --build-hl  lib/flat-foreign/flat-foreign.yaml\n```\n\nTo compile the examples run:\n```\ncabal v2-run jhc -- -L . examples/Calendar.hs -o calendar\ncabal v2-run jhc -- -L . examples/HelloWorld.hs -o hello\ncabal v2-run jhc -- -L . examples/Primes.hs -o primes\n```\n\n### Development Ideas\n\nCheck the list of development [ideas](Ideas.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsabahruska%2Fjhc-components","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsabahruska%2Fjhc-components","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsabahruska%2Fjhc-components/lists"}