Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newline not preserved between let and let bang #879

Closed
nojaf opened this issue Jun 1, 2020 · 0 comments · Fixed by #880
Closed

Newline not preserved between let and let bang #879

nojaf opened this issue Jun 1, 2020 · 0 comments · Fixed by #880
Assignees

Comments

@nojaf
Copy link
Contributor

nojaf commented Jun 1, 2020

Issue created from fantomas-online

There should be a new line before let! result =

Code

      let rec loop () =
        async {
          let! msg = inbox.Receive()

          match msg with
          | Handle (eventSource,command,reply) ->
              let! stream = eventSource |> eventStore.GetStream

              let newEvents =
                stream |> Result.map (asEvents >> behaviour command >> enveloped eventSource)

              let! result =
                newEvents
                |> function
                    | Ok events -> eventStore.Append events
                    | Error err -> async { return Error err }

              do reply.Reply result

              return! loop ()
        }

Result

let rec loop () =
  async {
    let! msg = inbox.Receive ()

    match msg with
    | Handle (eventSource, command, reply) ->
        let! stream = eventSource |> eventStore.GetStream

        let newEvents =
          stream
          |> Result.map
               (asEvents
                >> behaviour command
                >> enveloped eventSource)
        let! result =
          newEvents
          |> function
          | Ok events -> eventStore.Append events
          | Error err -> async { return Error err}

        do reply.Reply result

        return! loop ()
  }

Options

Fantomas Master at 06/01/2020 08:20:42 - 8824f4a

Name Value
IndentSpaceNum 2
PageWidth 120
SemicolonAtEndOfLine false
SpaceBeforeParameter true
SpaceBeforeLowercaseInvocation true
SpaceBeforeUppercaseInvocation true
SpaceBeforeClassConstructor false
SpaceBeforeMember false
SpaceBeforeColon false
SpaceAfterComma true
SpaceBeforeSemicolon false
SpaceAfterSemicolon true
IndentOnTryWith false
SpaceAroundDelimiter false
MaxIfThenElseShortWidth 40
MaxInfixOperatorExpression 50
MaxRecordWidth 40
MaxArrayOrListWidth 40
MaxLetBindingWidth 40
MultilineBlockBracketsOnSameColumn true
NewlineBetweenTypeDefinitionAndMembers false
KeepIfThenInSameLine false
StrictMode false
@nojaf nojaf self-assigned this Jun 1, 2020
nojaf added a commit to nojaf/fantomas that referenced this issue Jun 1, 2020
@nojaf nojaf closed this as completed in #880 Jun 2, 2020
nojaf added a commit that referenced this issue Jun 2, 2020
* print Trivia before entire LetBang expression. Fixes #879

* Bump to alpha 008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant