Comments (5)
@danstiner I can verify that stack install hfmt
works now. Thank you for your help
from hfmt.
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.
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.
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.
@conmute could run cabal update
and then try again? Thanks.
from hfmt.
Related Issues (20)
- hfmt chokes on stdin HOT 4
- Exit code semantics
- hfmt.EXE: app\Main.hs:(71,1)-(73,41): Non-exhaustive patterns in function sourceChangedOrHasSuggestions HOT 2
- Cant parse template haskell HOT 1
- Load config from source path
- stack-fmt exe
- Print suggestions even when overwriting sources
- Do not use `sourceList`
- Can't install with Stack HOT 1
- Use conditional includes to use `readGenericPackageDescription` only with newer cabal versions
- stack install hfmt fails on Windows with latest stack (stylish-haskell must match ==0.9.*) HOT 5
- Take Cabal default-extensions into account HOT 1
- Configuration files aren't installed with `cabal copy` (and I'm guessing `cabal install` too) HOT 6
- stack install hfmt fails on OSX HOT 1
- hfmt misformats haddock comments in the export list
- hfmt misformats the `*` operator when qualified and parenthesized
- stack update to lts-14.6 and ghc 8.6.5 HOT 3
- Remove restrictive upper bounds on stylish-haskell and hlint dependencies HOT 1
- Support newer GHC versions?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hfmt.