{"id":21598782,"url":"https://github.com/jaseemabid/olifant","last_synced_at":"2025-04-11T01:04:19.471Z","repository":{"id":141925331,"uuid":"92890929","full_name":"jaseemabid/Olifant","owner":"jaseemabid","description":"A simple programming language targeting LLVM","archived":false,"fork":false,"pushed_at":"2018-10-15T23:29:03.000Z","size":239,"stargazers_count":64,"open_issues_count":12,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T01:04:11.491Z","etag":null,"topics":["clang","compiler","haskell","llvm"],"latest_commit_sha":null,"homepage":"","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/jaseemabid.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":"2017-05-31T01:20:22.000Z","updated_at":"2023-11-13T21:07:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"cc9b2bb9-9857-4785-9239-be74f328c6b0","html_url":"https://github.com/jaseemabid/Olifant","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/jaseemabid%2FOlifant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaseemabid%2FOlifant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaseemabid%2FOlifant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaseemabid%2FOlifant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaseemabid","download_url":"https://codeload.github.com/jaseemabid/Olifant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322597,"owners_count":21084336,"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":["clang","compiler","haskell","llvm"],"created_at":"2024-11-24T18:13:08.151Z","updated_at":"2025-04-11T01:04:19.462Z","avatar_url":"https://github.com/jaseemabid.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Olifant [![Build Status](https://travis-ci.org/jaseemabid/Olifant.svg?branch=master)](https://travis-ci.org/jaseemabid/Olifant) [![Docker Repository on Quay](https://quay.io/repository/jaseemabid/olifant/status \"Docker Repository on Quay\")](https://quay.io/repository/jaseemabid/olifant)\n\nA simple functional language targeting LLVM, __WIP__ ⚙⚒\n\nProject is setup with [stack][stack]\n\n    $ git pull https://github.com/jaseemabid/Olifant \u0026\u0026 cd Olifant\n    $ stack setup \u0026\u0026 stack build\n\nSee the blog post [Lessons learned building a toy compiler][blog] for a detailed\nintroduction to the project.\n\nThe test coverage isn't great, but has a bunch of good code samples. They run\npretty fast 🏎 too.\n\n    $ stack test\n\nThe README maybe sparse, but there is a lot of inline documentation 📜 in the\ncode; which can be read with Haddock.\n\n    $ stack haddock --no-haddock-deps --open\n\nOlifant programs can be compiled to native binaries and executed in one step ⚡.\n\n    $ stack exec olifant \u003c\u003c\u003c 'sum 4 5'\n    $ 9\n\nThis is NOT an interpreter, a machine native binary is produced and executed in\none step 🎩.\n\n    $ file /tmp/cmd.exe\n    $ /tmp/cmd.exe: Mach-O 64-bit executable x86_64\n\nThere are some samples programs in the examples directory - these are real\nprograms used by the test runner so if the tests are ✅, these are guaranteed to\nwork.\n\nThe intermediary forms can be exported with additional flags. For example, the\noutput of the parser can be viewed with `-p`.\n\n    $ stack exec olifant -- -p \u003c\u003c\u003c 'sum 4 5'\n\n```haskell\n[ App (Ref\n       {rname = \"sum\", ri = 0, rty = TInt :\u003e (TInt :\u003e TInt), rscope = Extern})\n      [Lit (Number 4), Lit (Number 5)]\n]\n```\n\nSimilarly, Core is exported with `-c` and the intermediary LLVM IR is exported\nwith `-l`.\n\nThe compiler accepts programs from stdin or takes a file as argument.\n\n    $ olifant -l examples/vars.ol\n    $ file vars.ll\n    vars.ll: ASCII text\n\nDocker images are automatically built by quay.io as well as by Travis CI as part\nof automated testing. If you have trouble building the dependencies/libraries\nlocally, try the container.\n\n    $ make container\n    $ docker run -it olifant/olifant\n\nI would *LOVE* any code contributions. There is a [milestone][milestone] to\ntrack priority bugs and features if you are looking for some inspiration.\n\n[blog]: https://jaseemabid.github.io/2017/07/04/compiler.html\n[stack]: https://haskellstack.org\n[milestone]: https://github.com/jaseemabid/Olifant/milestone/2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaseemabid%2Folifant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaseemabid%2Folifant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaseemabid%2Folifant/lists"}