Format class declarations #236
Labels
No Label
blocked: dependency
blocked: info-needed
bug
duplicate
enhancement
fixed in HEAD
help wanted
hs:arrows
hs:brackets
hs:classes
hs:comments
hs:do-notation
hs:guards
hs:lists
hs:operators
hs:patterns
hs:records
hs:types
invalid
language extension support
layouting
needs confirmation
priority: high
priority: low
question
revisit before next release
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: hexagoxel/brittany#236
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Brittany does not currently format type class declarations. Instead it simply passes them through. That's fine for a lot of cases because defining new type classes is less common than adding instances. Also type classes often aren't very complicated syntactically, so it's not too burdensome to format them by hand. All that being said, it would be great if Brittany could format them. For example, consider this type class declaration:
I chose 20 columns arbitrarily in order to force the layout onto multiple lines. Otherwise the result isn't super interesting.
I'm not exactly sure how I'd like that to be formatted, but maybe something like this?