From 51d2a951e6d0622b83f5865f3ec547f476fbf530 Mon Sep 17 00:00:00 2001 From: sudoer777 Date: Fri, 15 Sep 2023 01:57:17 -0500 Subject: [PATCH] Attempt to install llvm using nix --- README.md | 6 ++++-- package.yaml | 2 +- really-bad-compiler-in-haskell.cabal | 1 - stack.yaml | 3 +++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d96faf2..60acfd3 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,10 @@ 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 all of the Haskell tools. -- Use `stack build` and `stack run ` to run the program. +- Use `ghcup` to install `stack 2.9.3`, `HLS 2.2.0.0`, and `cabal 3.6.2.0` (recommended versions of the time of writing). +- Use `stack run ` to run the program (for example, `stack run example/1`). ## File structure @@ -31,6 +32,7 @@ Main repo: https://git.sudoer.ch/me/really-bad-compiler-in-haskell - 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 diff --git a/package.yaml b/package.yaml index 7e5c0d4..72274b6 100644 --- a/package.yaml +++ b/package.yaml @@ -11,7 +11,7 @@ dependencies: tested-with: GHC == 8.10.7 category: Compilers/Interpreters -ghc-options: -threaded -Wall -j8 +RTS -A64M -RTS +# ghc-options: -threaded -Wall -j8 +RTS -A64M -RTS # library: # source-dirs: src diff --git a/really-bad-compiler-in-haskell.cabal b/really-bad-compiler-in-haskell.cabal index 162813e..2ce1b08 100644 --- a/really-bad-compiler-in-haskell.cabal +++ b/really-bad-compiler-in-haskell.cabal @@ -22,7 +22,6 @@ executable really-bad-compiler-in-haskell Paths_really_bad_compiler_in_haskell hs-source-dirs: app - ghc-options: -threaded -Wall -j8 +RTS -A64M -RTS build-depends: base >=4.14.3 && <5 , llvm-hs-pretty ==12.* diff --git a/stack.yaml b/stack.yaml index ae77151..d3653e4 100644 --- a/stack.yaml +++ b/stack.yaml @@ -9,3 +9,6 @@ extra-deps: commit: 423220bffac4990d019fc088c46c5f25310d5a33 subdirs: - llvm-hs-pure +# nix: +# enable: true +# packages: [llvm_13, clang_13]