xcode-select --installApparently you can install all of Xcode, which is a big (12G) IDE to do code development for iOS as well as macOS. The above just installs the command line tools.
And it tells me that they are already installed. Apparently when I tried to run "cc" and then it asked if I wanted to install the compiler, it did this for me. Next I do this:
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | shIt will install to /Users/tom/.ghcup. It can install these components:
ghcup ghc cabal stack hlsI select the G channel and say no to alpha releases.
o start a simple repl, run: ghci To start a new haskell project in the current directory, run: cabal init --interactive To install other GHC versions and tools, run: ghcup tui If you are new to Haskell, check out https://www.haskell.org/ghcup/steps/I did all this over an ssh connection. I log out and back in so I get a new shell and pick up the changes to .bashrc.
I type "which runghc" and discover that this is in /Users/tom/.ghcup/bin/runghc
Putting this in the "shebang" line for xyz.hs does not work.
Apparently macOS won't process nested shebangs and runghc itself is a bash
script. Using "env" on the first line will fix this.
This "script" works:
#!/usr/bin/env runghc #!/usr/bin/runghc main = putStrLn "hey"Actually, it would work on linux also, so I could start using this for my shebang line there to make scripts portable.
Typing "ghc" gives me:
ghc-9.10.3: no input filesSo this all looks good.