Giter Site home page Giter Site logo

Unable to use ghcid about alga HOT 6 CLOSED

srid avatar srid commented on June 26, 2024
Unable to use ghcid

from alga.

Comments (6)

andrewthad avatar andrewthad commented on June 26, 2024 1

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

from alga.

snowleopard avatar snowleopard commented on June 26, 2024

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?

from alga.

andrewthad avatar andrewthad commented on June 26, 2024

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.

from alga.

snowleopard avatar snowleopard commented on June 26, 2024

@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.

from alga.

wbadart avatar wbadart commented on June 26, 2024

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

from alga.

srid avatar srid commented on June 26, 2024

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.

from alga.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.