But the problem is NOT with that import. It's with the OPTIONS_GHC in GHC.Internal.Classes, which is not in the external-modules section.
Warning: Specifying an absolute path to the project file is deprecated. Use
--project-dir to set the project's directory.
Configuration is affected by cabal.project at
'/home/simonpj/code/HEAD-19/hadrian'.
Up to date
Warning: Specifying an absolute path to the project file is deprecated. Use
--project-dir to set the project's directory.
Configuration is affected by cabal.project at
'/home/simonpj/code/HEAD-19/hadrian'.
]0;Starting...(/home/simonpj/code/HEAD-19) | Copy file: utils/haddock/haddock-api/resources/html/Classic.theme/plus.gif => _build/stage1/lib/html/Classic.theme/plus.gif
| Run Ghc FindHsDependencies (Stage0 InTreeLibs): libraries/ghc-boot-th/GHC/Boot/TH/Lib.hs (and 14 more) => _build/stage0/libraries/ghc-boot-th-next/.
dependencies.mk/home/simonpj/code/HEAD-19/libraries/ghc-boot-th-next/../ghc-internal/src/GHC/Internal/Classes.hs:10:17: error: [GHC-04924]
Unknown flag in {-# OPTIONS_GHC #-} pragma: -fdefines-known-key-names
|
10 | {-# OPTIONS_GHC -fdefines-known-key-names #-}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
]0;Finished in 2.54s(/home/simonpj/code/HEAD-19) Development.Shake.cmd, system command failed
Command line: /home/simonpj/.ghcup/bin/ghc -M -include-cpp-deps -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage0/inplace/package.conf.d' '-this-unit-id ghc-boot-th-next-9.15-inplace' '-this-package-name ghc-boot-th-next' '-package-id base-4.21.0.0-ae91' '-package-id ghc-prim-0.13.0-e168' '-package-id pretty-1.1.3.6-fe44' -i -i/home/simonpj/code/HEAD-19/_build/stage0/libraries/ghc-boot-th-next/build -i/home/simonpj/code/HEAD-19/_build/stage0/libraries/ghc-boot-th-next/build/autogen -i/home/simonpj/code/HEAD-19/libraries/ghc-boot-th-next/../ghc-boot-th -i/home/simonpj/code/HEAD-19/libraries/ghc-boot-th-next/../ghc-internal/src -I_build/stage0/libraries/ghc-boot-th-next/build -I/home/simonpj/.ghcup/ghc/9.12.2/lib/ghc-9.12.2/lib/x86_64-linux-ghc-9.12.2-a828/ghc-internal-9.1202.0-1465/include -I/home/simonpj/.ghcup/ghc/9.12.2/lib/ghc-9.12.2/lib/x86_64-linux-ghc-9.12.2-a828/ghc-bignum-1.3-6db4/include -I/home/simonpj/.ghcup/ghc/9.12.2/lib/ghc-9.12.2/lib/x86_64-linux-ghc-9.12.2-a828/rts-1.0.2/include -optP-include -optP_build/stage0/libraries/ghc-boot-th-next/build/autogen/cabal_macros.h -optP-DBOOTSTRAP_TH -outputdir _build/stage0/libraries/ghc-boot-th-next/build -fdiagnostics-color=always -XHaskell2010 -XNoImplicitPrelude -optc-Wno-error=inline -include-pkg-deps -dep-makefile _build/stage0/libraries/ghc-boot-th-next/.
dependencies.mk -dep-suffix '' -fno-warn-deprecated-flags -O +RTS -O64M -RTS @/tmp/extra-file-89749345684126-2082901-0
Exit code: 1
Stderr:
/home/simonpj/code/HEAD-19/libraries/ghc-boot-th-next/../ghc-internal/src/GHC/Internal/Classes.hs:10:17: error: [GHC-04924]
Unknown flag in {-# OPTIONS_GHC #-} pragma: -fdefines-known-key-names
|
10 | {-# OPTIONS_GHC -fdefines-known-key-names #-}
| ^^^^^^^^^^^^^^^^^^^^^^^^^