-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
When using Record Dot Syntax, Floskell is willing to break the code:
By default, this breaks when formatted with the base and cramer styles, and any others which do not use a workaround:
askAppCommand :: RIO App CliCommand
askAppCommand = do
env <- ask @App
return $ env.appCommand
-- Gets replaced with:
-- return $ env . appCommand
-- Which attempts to compose a record with its field accessorBut this workaround preserves compilation across format calls:
"op": {
". in expression": {
"force-linebreak": false,
"spaces": "none",
"linebreaks": "after"
}
}
... Unfortunately, that workaround immediately breaks most point-free code, including the below:
a . b . c
-- Gets replaced with:
-- a.b.c
-- Which attempts to access `a` as a record with field `b` having field `c`So far as I can tell, there's no viable configuration that produces the intended behaviour in both scenarios.
Metadata
Metadata
Assignees
Labels
No labels