Closed4

macOS 15 Apple SiliconにHaskellをインストールする

trysmrtrysmr

途中に書いてあるようにllvmが必要みたい(ドキュメントにもあった)

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.
trysmrtrysmr

issueにあった https://github.com/haskell/ghcup-hs/issues/1173 を参考して

brew install llvm@15 ghcup
export CXX=/opt/homebrew/opt/llvm@15/bin/clang++
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh

これでインストールできた。

途中PATHにghcupを追加するか、HLSをインストールするか、stackをインストールするか聞かれる。公式ドキュメントによるとaarch64なmacOSではサポートしていないようなのでstackはなしにした。

trysmrtrysmr
$ ghci --version
The Glorious Glasgow Haskell Compilation System, version 9.4.8
このスクラップは3ヶ月前にクローズされました