Latest MacOS version

What is the latest MacOS version that I can use with Haskell (and associated tooling)? Note that my Mac is Intel-based, not Apple-Mn.

I don’t know the precise answer, but make sure you are using GHCup to install the toolchain: it is easy, reliable, will make sensible choices for youl.

1 Like

Usually the question is “what is the oldest macOS version I can use Haskell with?”. Newer is usually fine. For older, I think the answer is 10.7 (at least for GHC)

1 Like

I tried doing brew install hpack and got

Error: You are using macOS 10.15.
We (and Apple) do not provide support for this old version.

This is an issue with brew, not Haskell.

Hence the associated tooling

brew is not associated with Haskell in any way. It’s a general purpose package manager. We’re not maintaining it nor the packages within.

Haskell uses cabal or stack to install packages. See 2. Introduction — Cabal 3.10.1.0 User's Guide

2 Likes

@qwaggy, can you try install it via cabal install?

cabal install hpack

The executable — rather, symlink — should be located in ~/.cabal/bin/ (or in ~/.local/bin if you have a blazing new version of cabal). Add that directory in your $PATH if you have not already.

Generally speaking, to install Haskell tools and programs, it is often better to rely on cabal than on system repositories or tools.

2 Likes

The hpack package provides a library and an executable. To install the executable using Stack:

  1. Unpack the latest version of the package from Hackage:
stack unpack hpack
  1. Change into the package directory:
cd hpack-0.35.3
  1. Create a Stack project configuration file, stack.yaml. Lets assume you want to build with GHC 9.4.5. hpack depends on certain packages not included in the current Stackage Haskell LTS snapshot for GHC 9.4.5: lts-21.4. Stack will help you identify what those ‘extra’ dependencies are. With that help, you can quickly arrive at:
resolver: lts-21.4 #GHC 9.4.5
packages:
- .
extra-deps:
- crypton-connection-0.3.1
- crypton-x509-1.7.6
- crypton-x509-store-1.6.9
- crypton-x509-system-1.6.7
- crypton-x509-validation-1.6.12
- http-client-tls-0.3.6.2
- tls-1.7.0
  1. Build the hpack executable component of the package, and copy the executable file to a convenient location:
stack install :hpack
  1. If that location is not convenient, tell Stack where you want the local binary to be located:
stack install :hpack --local-bin-path <path_to_location_for_local_binary>

EDIT: If you want less control, at step 3 you can have Stack create the stack.yaml for you, by commanding stack init. Stack will likely work out that a recent Stackage Nightly snapshot (GHC 9.6.2) will do the job.

brew and all Haskell tools are working fine for me with latest mac os Ventura (13.5).

I have two macs using mac os 13.3.1 - an intel and an M2.
GHC 9.4.5 works fine on both.
I install via nix and devenv.