Coder Social home page Coder Social logo

Comments (5)

autolyticus avatar autolyticus commented on July 21, 2024 1

@danstiner I can verify that stack install hfmt works now. Thank you for your help

from hfmt.

eozd avatar eozd commented on July 21, 2024

I also had this same issue. I believe the problem is, in the newer versions, a Semigroup instance is required for every Monoid instance. This issue is addressed in #39 . As a temporary solution (and also what I did), you can get the changes implemented in #39 and build the project from sources.

from hfmt.

danstiner avatar danstiner commented on July 21, 2024

I believe this is fixed in the new version thanks to a couple contributions, if you can confirm that would be helpful! Thanks.

from hfmt.

conmute avatar conmute commented on July 21, 2024

Having the same issue:

koss-2:learn_haskell user$ cabal install hfmt
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Resolving dependencies...
Configuring hfmt-0.2.2...
Building hfmt-0.2.2...
Failed to install hfmt-0.2.2
Build log ( /Users/user/.cabal/logs/ghc-8.4.3/hfmt-0.2.2-5js8EhO2hakLrncDeVacVT.log ):
cabal: Entering directory '/var/folders/fq/_6c_b5fs6j1__ptdzlhl4yb80000gn/T/cabal-tmp-36387/hfmt-0.2.2'
Configuring hfmt-0.2.2...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Preprocessing library for hfmt-0.2.2..
Building library for hfmt-0.2.2..
[1 of 9] Compiling Language.Haskell.Format.Types ( src/Language/Haskell/Format/Types.hs, dist/build/Language/Haskell/Format/Types.o )

src/Language/Haskell/Format/Types.hs:29:10: error:
    • No instance for (Semigroup Reformatted)
        arising from the superclasses of an instance declaration
    • In the instance declaration for ‘Monoid Reformatted’
   |
29 | instance Monoid Reformatted where
   |          ^^^^^^^^^^^^^^^^^^

src/Language/Haskell/Format/Types.hs:38:10: error:
    • No instance for (Semigroup Formatter)
        arising from the superclasses of an instance declaration
    • In the instance declaration for ‘Monoid Formatter’
   |
38 | instance Monoid Formatter where
   |          ^^^^^^^^^^^^^^^^

src/Language/Haskell/Format/Types.hs:46:30: error:
    • No instance for (Semigroup Reformatted)
        arising from a use of ‘<>’
    • In the first argument of ‘(<$>)’, namely ‘(r <>)’
      In the expression: (r <>) <$> formatter (reformattedSource r)
      In an equation for ‘asReformatter’:
          asReformatter formatter r
            = (r <>) <$> formatter (reformattedSource r)
   |
46 | asReformatter formatter r = (r <>) <$> formatter (reformattedSource r)
   |                              ^^^^
cabal: Leaving directory '/var/folders/fq/_6c_b5fs6j1__ptdzlhl4yb80000gn/T/cabal-tmp-36387/hfmt-0.2.2'
cabal: Error: some packages failed to install:
hfmt-0.2.2-5js8EhO2hakLrncDeVacVT failed during the building phase. The
exception was:
ExitFailure 1

Versions are:

koss-2:learn_haskell user$ cabal --version
cabal-install version 2.2.0.0
compiled using version 2.2.0.1 of the Cabal library
koss-2:learn_haskell user$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.4.3
koss-2:learn_haskell user$

On macOS Hight Siera…

from hfmt.

danstiner avatar danstiner commented on July 21, 2024

@conmute could run cabal update and then try again? Thanks.

from hfmt.

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.