Stylish-haskell style import and record formatting #12

Closed
opened 2017-02-28 00:11:51 +01:00 by ElvishJerricco · 6 comments
ElvishJerricco commented 2017-02-28 00:11:51 +01:00 (Migrated from github.com)

Stylish-haskell and Brittany usually get along fine. But there are rare occasions where they disagree (case statements with guards are the only one I know of). So if the user wants the features of both, they have to give precedence to one of the tools.

I personally only use stylish-haskell because of the formatting of imports and of record types. If Brittany did these things, I would just drop stylish-haskell altogether.

(PS: Sorry for bombarding you with 4 issues today =P I've been using Brittany for a little while now, and I'm starting to want to make some changes / fixes, so I'm documenting them in the form of issues. We'll see if I have the time to get to any of them myself.)

Stylish-haskell and Brittany *usually* get along fine. But there are rare occasions where they disagree (case statements with guards are the only one I know of). So if the user wants the features of both, they have to give precedence to one of the tools. I personally only use `stylish-haskell` because of the formatting of imports and of record types. If Brittany did these things, I would just drop `stylish-haskell` altogether. *(PS: Sorry for bombarding you with 4 issues today =P I've been using Brittany for a little while now, and I'm starting to want to make some changes / fixes, so I'm documenting them in the form of issues. We'll see if I have the time to get to any of them myself.)*
lspitzner commented 2017-03-06 21:00:09 +01:00 (Migrated from github.com)

Fyi if you want to contribute, I have started adding some docs that might be helpful. See docs/implementation/bridoc-design.md

Fyi if you want to contribute, I have started adding some docs that might be helpful. See [`docs/implementation/bridoc-design.md`](https://github.com/lspitzner/brittany/blob/master/docs/implementation/bridoc-design.md)
ElvishJerricco commented 2017-03-06 21:03:21 +01:00 (Migrated from github.com)

That's a good doc! Helps a ton, thanks.

That's a good doc! Helps a ton, thanks.
lspitzner commented 2017-03-17 14:17:24 +01:00 (Migrated from github.com)

have you made any progress on this? I might start on something for data/record types otherwise.

have you made any progress on this? I might start on something for data/record types otherwise.
ElvishJerricco commented 2017-03-17 18:10:07 +01:00 (Migrated from github.com)

I have not.

I have not.
lspitzner commented 2017-03-30 23:33:47 +02:00 (Migrated from github.com)

the ghc syntax tree again takes me some time to figure out. I had not realized how overloaded commas in record definitions are, e.g.

data Foo = Foo { a, b :: Int, c, d :: Bool }

is valid. If you think you know haskell syntax, implement a formatter.

the ghc syntax tree again takes me some time to figure out. I had not realized how overloaded commas in record definitions are, e.g. ~~~~.hs data Foo = Foo { a, b :: Int, c, d :: Bool } ~~~~ is valid. If you think you know haskell syntax, implement a formatter.
tfausak commented 2019-06-18 19:52:57 +02:00 (Migrated from github.com)

Since there are separate issues for imports (#155) and records (#47), I'm going to close this issue.

Since there are separate issues for imports (#155) and records (#47), I'm going to close this issue.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hexagoxel/brittany#12
There is no content yet.