Skip to content

WIP: OS shuffle: 'darwin' -> 'macos', 'macos' + 'ios' -> 'darwin'

John Ericson requested to merge Ericson2314/ghc:darwin-vs-macos into master

A while back I talked to @angerman and @bgamari about switching the way the Apple OSes are categorized into:

   darwin
  /      \
macos    ios | tvos | watchos

The idea is that

  1. OsIos (or whatever it was called) was long ago removed in cb4878ff, leaving just OsDarwin. This makes CPP match.
  2. Listing each one when just a generic "darwin" check is needed is error-prone.
  3. Apple as vaguely switched to doing things this way, so it should have a bit less friction with their prebuilt binaries.
  4. Android on the CPP (and Haskell) level is already Linux.
  5. Nixpkgs also made this change :).

This is an implementation of that idea that works with GHC 8.2.....hurriedly rebased. Getting this up WIP to confirm the idea is still a good one before cleaning up / testing some more.

Merge request reports