A HEAR (C-like) compiler written in Haskell
This repository has been archived on 2024-04-05. You can view files and clone it, but cannot push or open issues/pull-requests.
Go to file
Ethan Reece 187f0577f5
Revert to LLVM 15 and remove llvm-hs-pretty for lack of support
2023-09-15 02:37:47 -05:00
app Read expressions from file 2023-09-08 01:31:07 -05:00
example Add example programs 2023-09-11 12:04:36 -05:00
.gitignore Cabal init 2023-09-07 17:24:45 -05:00
CHANGELOG.md Cabal init 2023-09-07 17:24:45 -05:00
README.md Revert to LLVM 15 and remove llvm-hs-pretty for lack of support 2023-09-15 02:37:47 -05:00
package.yaml Revert to LLVM 15 and remove llvm-hs-pretty for lack of support 2023-09-15 02:37:47 -05:00
really-bad-compiler-in-haskell.cabal Revert to LLVM 15 and remove llvm-hs-pretty for lack of support 2023-09-15 02:37:47 -05:00
stack.yaml Revert to LLVM 15 and remove llvm-hs-pretty for lack of support 2023-09-15 02:37:47 -05:00
stack.yaml.lock Revert to LLVM 15 and remove llvm-hs-pretty for lack of support 2023-09-15 02:37:47 -05:00

README.md

Really Bad Compiler in Haskell

A compiler written in Haskell that is really bad (I do not know what language I am going to compile yet). Built for the Introduction to Compiler Design class at The University of Texas at Dallas.

Main repo: https://git.sudoer.ch/me/really-bad-compiler-in-haskell

Build Instructions

  • Install ghcup (for managing Haskell tools) and nix (for managing external dependencies).
  • Clone the repo.
  • Use ghcup to install stack 2.9.3, HLS 2.2.0.0, and cabal 3.6.2.0.
  • Use stack run <file> to run the program (for example, stack run example/1).

File structure

  • app - contains the compiler program
  • example - contains example programs that can be compiled

Credits

Learning Resources Used

Tools

  • Language: Haskell
  • Haskell tools: GHCup, Stack, Cabal
  • Libraries: megaparsec, parser-combinators, text, llvm-hs-pure, llvm-hs-pretty
  • Dependencies: llvm, clang
  • IDE: VSCodium
  • Git platform: Forgejo
  • AI: Phind
  • Search: Kagi, Stack Overflow