it seems that the happy program is not installed on your system, so the haskell-src-exts-1.17.1 (ghc-mod dependency dependency), which is independent of it, cannot be installed.
The common wisdom today, especially for beginners, is not to use the cabal-install tool, but to use stack for everything you need instead. including installing ghc itself. after loading the stack, I think all you have to do is run stack install ghc-mod to install ghc-mod .
soupi source share