emilyhorsman / haskell-resources

0 stars 1 forks source link

The elm-format of Haskell? #1

Open emilyhorsman opened 7 years ago

emilyhorsman commented 7 years ago

Is there something akin to elm-format or gofmt for Haskell? It would be really nice to have a plugin/binary that formats code to a convention.

jnlon commented 7 years ago

I found this: https://hackage.haskell.org/package/hfmt

In theory:

cabal update && cabal install hfmt

But I'm getting errors installing dependencies.

Anyone else have luck with it?

emilyhorsman commented 7 years ago

Did you cabal install happy beforehand? I had an issue installing hlint and that solved it. hlint is supposed to have a --refactor flag that I think does what I want? I couldn't get it to work though because it needs accept-refactor which I couldn't get to build.

cabal: kind of a mess so far?

emilyhorsman commented 7 years ago

hfmt looks nice though and I'm gonna try to build it when I get back to this. Post your stack trace?

emilyhorsman commented 7 years ago

screen shot 2016-11-22 at 7 23 03 pm

This being backwards is very amusing to me.

jnlon commented 7 years ago

cabal stack trace: https://gist.github.com/spinclick/4ff2cfd7575f39dc987c002b5d33cc5c

jnlon commented 7 years ago

Kinda reminds me of when I tried to build elm from source... errors everywhere!