Skip to content

Lifting functions like liftA2 should allow the lifted function to sit on the same line as the lift #1155

Open
@endgame

Description

@endgame

Is your feature request related to a problem? Please describe.
I find the following code a bit unsightly:

foo = do
  ok <-
    liftA2
      (&&)
      (checkRedirects (snd <$> hrRedirects response))
      (checkResponse response)
  ...

Describe the solution you'd like
More than most other functions, I think of a lifting function like lift[A-Z][2-9] as a unary function that takes a function-to-be-lifted and returns a function of N arguments. I therefore think that this output shows what's going on more clearly and doesn't waste a vertical line (the first argument is often very short — nearly always an operator or a function with no arguments):

foo = do
  ok <-
    liftA2 (&&)
      (checkRedirects (snd <$> hrRedirects response))
      (checkResponse response)
  ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    styleNitpicking and things related to purely visual aspect for formatting.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions