I installed Haskell on an M1 Mac following the official guide. During the installation, the following message was prompted:
System requirements
Note: On OS X, in the course of running ghcup you will be given a dialog box to install the command line tools. Accept and the requirements will be installed for you. You will then need to run the command again.
On Darwin M1 you might also need a working llvm installed (e.g. via brew) and have the toolchain exposed in PATH.
I additionally installed LLVM using homebrew:
brew install llvm@12
When trying ...
ghc --make <file>
... I get the following error message:
<no location info>: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM between [9 and 13)
ghc: could not execute: opt
How can I fix that? Or how can I go about the "have the toolchain exposed in PATH" part of the alert? I'm using ZSH, in case this is of relevance.
sh-compliant shell, assumingbrewputs things in the usual places,export PATH="/usr/local/opt/llvm@12/bin:$PATH"? This should be placed in whatever profile file zsh reads if you want to make it permanent.binfolder ofllvm@12to be located here:/opt/homebrew/Cellar/llvm@12/12.0.1_1/bin. However, it works like that. Is there a better way to link to it, or have I misconfigured homebrew when setting it up?Cellaris where things are supposed to go.