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

Vanity alignment when using operator <| #8

Open
3 tasks
knocte opened this issue Aug 22, 2022 · 0 comments
Open
3 tasks

Vanity alignment when using operator <| #8

knocte opened this issue Aug 22, 2022 · 0 comments

Comments

@knocte
Copy link
Member

knocte commented Aug 22, 2022

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?

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

No branches or pull requests

1 participant