Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use ghcid #260

Closed
srid opened this issue Apr 30, 2020 · 6 comments
Closed

Unable to use ghcid #260

srid opened this issue Apr 30, 2020 · 6 comments

Comments

@srid
Copy link
Contributor

srid commented Apr 30, 2020

Full build (nix-build) succeeds, but I can't use ghcid for some reason.

image

@snowleopard
Copy link
Owner

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?

@andrewthad
Copy link

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.

@snowleopard
Copy link
Owner

@andrewthad Default extensions can also be enabled in the .ghci script, as I'm doing here:

alga/.ghci

Lines 7 to 12 in f338259

:set -XFlexibleContexts
:set -XFlexibleInstances
:set -XGeneralizedNewtypeDeriving
:set -XScopedTypeVariables
:set -XTupleSections
:set -XTypeFamilies

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.

@andrewthad
Copy link

I suspect that would fix it too. I don't use nix though, so I cannot replicate the OP's issue.

@wbadart
Copy link

wbadart commented Feb 23, 2021

@srid can you share the derivation you're using?

@srid
Copy link
Contributor Author

srid commented Apr 3, 2021

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.

@srid srid closed this as completed Apr 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants