ArdanaLabs / dUSD

6 stars 3 forks source link

Haskell Formatting #10

Closed NorfairKing closed 2 years ago

NorfairKing commented 2 years ago

We'd like to enforce Haskell formatting.

NorfairKing commented 2 years ago

I vote ormolu, because it's not configurable.

NorfairKing commented 2 years ago

BrianK votes "use fourmolu with the fourmolu.yaml from DanaSwap-Plutarch". You can add :+1: here to vote for that.

srid commented 2 years ago

Current votes: 3-3, but 2-3 if we count only people who write Haskell in the project. 😄 So the winner is fourmolu.


As to how to implement this, we could parameterize https://github.com/ArdanaLabs/danalib/blob/main/linters/haskell.nix to take the formatter tool as an argument, such that it is no longer hardcoded to use stylish-haskell, and thus can work with other formatters.

nixinator commented 2 years ago

I'd prefer to hardcode only one for formatter for Ardana repo's if possible. We won't be changing formatting half way thru the lifecyle of the source repo. It's one of the few places i would not want an 'option', but for it be set in stone, which is actually quite rare for me to say.

as they say in the Matrix, the problem within the matrix, is 'choice', which ultimately leads to its destruction over and over.

srid commented 2 years ago

Proof of concept: https://github.com/ArdanaLabs/DanaSwap-Plutarch/pull/69

If the nix folks can review this PR and approve it, I can open a similar one on top of dUSD.

Geometer1729 commented 2 years ago

solved by https://github.com/ArdanaLabs/dUSD/pull/43