HTF icon indicating copy to clipboard operation
HTF copied to clipboard

HTF installation fails on Windows 11

Open Darkleynad7 opened this issue 3 months ago • 0 comments

I tried to clean install Haskell and HTF on a Windows 11 machine for a university course. I followed the instructions to install all the haskell components with GHCup, and then I ran cabal install HTF to install HTF, however all my installation attempts fail with

Failed to build HTF-0.15.0.2.
Build log (
C:\cabal\logs\ghc-9.0.2\HTF-0.15.0.2-545533d474ef200444e27a66657afdafc1f06312.log
):
Preprocessing library for HTF-0.15.0.2..
Building library for HTF-0.15.0.2..

Test\Framework\HUnitWrapper.hs:1:7: error:
    lexical error in pragma at character '1'
  |
1 | {-# OPTIONS_GHC -cpp -pgmP "cpphs --layout --hashes --cpp" #-}
  |       ^

Test\Framework\Preprocessor.hs:1:7: error:
    lexical error in pragma at character '1'
  |
1 | {-# OPTIONS_GHC -cpp -pgmP "cpphs --layout --hashes --cpp" #-}
  |       ^
Error: cabal-3.10.3.0.exe: Failed to build HTF-0.15.0.2 (which is required by
exe:htfpp from HTF-0.15.0.2). See the build log above for details.

I have tried multiple versions of cabal and ghc but none seem to work. Any suggestions?

Darkleynad7 avatar Oct 20 '25 21:10 Darkleynad7