Is your feature request related to a problem? Please describe.
https://github.com/tweag/ormolu/issues/516 now allows formatting a certain part of the file and it's a big improvement. This feature request is similar to that but applies to regions in a where clause rather than to top-level regions.
Sometimes I want to format only a certain inner function in a where clause (e.g., when adding a new inner function to an existing file). But it's not currently possible because it is not a top-level entity. It will be a usability improvement to be able to do that.
A workaround is to temporarily move the inner function to the top-level, format it, move it back to the where clause, and then indent appropriately. But it's inconvenient.
Is your feature request related to a problem? Please describe.
https://github.com/tweag/ormolu/issues/516 now allows formatting a certain part of the file and it's a big improvement. This feature request is similar to that but applies to regions in a
where
clause rather than to top-level regions.Sometimes I want to format only a certain inner function in a
where
clause (e.g., when adding a new inner function to an existing file). But it's not currently possible because it is not a top-level entity. It will be a usability improvement to be able to do that.Describe the solution you'd like
In a similar way https://github.com/tweag/ormolu/issues/516 handles top-level entities.
Describe alternatives you've considered
A workaround is to temporarily move the inner function to the top-level, format it, move it back to the
where
clause, and then indent appropriately. But it's inconvenient.