I'm on Arch, and I'm trying to install hsdev
with cabal (cabal install hsdev
), but when it starts compiling and it gets to compiling HsDev.Tools.GhcMod
I get following message :
[46 of 58] Compiling HsDev.Tools.GhcMod ( src/HsDev/Tools/GhcMod.hs, dist/build/HsDev/Tools/GhcMod.o )
src/HsDev/Tools/GhcMod.hs:64:54:
‘GhcMod.ghcUserOptions’ is not a (visible) constructor field name
src/HsDev/Tools/GhcMod.hs:73:34:
‘GhcMod.detailed’ is not a (visible) constructor field name
src/HsDev/Tools/GhcMod.hs:73:58:
‘GhcMod.qualified’ is not a (visible) constructor field name
src/HsDev/Tools/GhcMod.hs:73:83:
‘GhcMod.ghcUserOptions’ is not a (visible) constructor field name
src/HsDev/Tools/GhcMod.hs:118:38:
‘GhcMod.ghcUserOptions’ is not a (visible) constructor field name
src/HsDev/Tools/GhcMod.hs:176:58:
‘GhcMod.ghcUserOptions’ is not a (visible) constructor field name
src/HsDev/Tools/GhcMod.hs:221:32:
‘GhcMod.ghcUserOptions’ is not a (visible) constructor field name
src/HsDev/Tools/GhcMod.hs:228:32:
‘GhcMod.hlintOpts’ is not a (visible) constructor field name
cabal: Error: some packages failed to install:
hsdev-0.1.4.3 failed during the building phase. The exception was:
ExitFailure 1
Ok, I have figured it out. Latest version of ghc-mod is not compatible with hsdev, so I had to add constraint for it: