Skip to content

Vanity alignment when using operator <| #8

@knocte

Description

@knocte

Issue created from fantomas-online

Code

[<AutoOpen>]
module KeyExtensions =
    type PerCommitmentPoint with
        member this.DerivePaymentPrivKey
            (paymentBasepointSecret: PaymentBasepointSecret)
            (channelType: ChannelType)
            (isRemoteKey: bool)
            : PaymentPrivKey =
            PaymentPrivKey
            <| match channelType, isRemoteKey with
               | ChannelType.StaticRemoteKey, true ->
                   paymentBasepointSecret.RawKey()
               | _ -> this.DerivePrivKey(paymentBasepointSecret.RawKey())

Result

[<AutoOpen>]
module KeyExtensions =
    type PerCommitmentPoint with

        member this.DerivePaymentPrivKey
            (paymentBasepointSecret: PaymentBasepointSecret)
            (channelType: ChannelType)
            (isRemoteKey: bool)
            : PaymentPrivKey =
            PaymentPrivKey
            <| match channelType, isRemoteKey with
               | ChannelType.StaticRemoteKey, true -> paymentBasepointSecret.RawKey()
               | _ -> this.DerivePrivKey(paymentBasepointSecret.RawKey())

Expected Result?

[<AutoOpen>]
module KeyExtensions =
    type PerCommitmentPoint with

        member this.DerivePaymentPrivKey
            (paymentBasepointSecret: PaymentBasepointSecret)
            (channelType: ChannelType)
            (isRemoteKey: bool)
            : PaymentPrivKey =
            PaymentPrivKey
            <| match channelType, isRemoteKey with
                | ChannelType.StaticRemoteKey, true -> paymentBasepointSecret.RawKey()
                | _ -> this.DerivePrivKey(paymentBasepointSecret.RawKey())

Problem description

Please describe here the Fantomas problem you encountered.
Check out our Contribution Guidelines.

Extra information

  • The formatted result breaks my code.
  • The formatted result gives compiler warnings.
  • I or my company would be willing to help fix this.

Options

Fantomas master branch at 2022-08-21T14:18:45Z - e68e223

Default Fantomas configuration

Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions