Closed srid closed 3 years ago
I'm not using Nix, and can't reproduce with my setup.
Note that DeriveFunctor
is in the default-extensions
in the common
stanza. Perhaps, you are using an old Cabal that doesn't support common
stanzas?
The problem is almost certainly the use of default-extensions
. If ghcid is just invoking ghci (rather than cabal repl), then the expecting extensions will not be enabled, and compilation will fail. The solution is simple: put {-# language DeriveFunctor #-}
at the top of every module instead of using default-extensions
.
@andrewthad Default extensions can also be enabled in the .ghci
script, as I'm doing here:
https://github.com/snowleopard/alga/blob/f3382596498a69d8ebce1e0ccb36dd99e9ae3810/.ghci#L7-L12
Perhaps, it's just a matter of adding DeriveFunctor
there? I'd be happy to accept a PR that does that if it fixes this issue for you.
I suspect that would fix it too. I don't use nix though, so I cannot replicate the OP's issue.
@srid can you share the derivation you're using?
I don't remember right now, but I believe I was using alga as an obelisk thunk in a GHC 8.6 project.
I'll close this as I'm not looking for a solution to this anymore, but feel free to open if anybody thinks this is worth supporting.
Full build (nix-build) succeeds, but I can't use ghcid for some reason.