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

Flexible parameter generation issue #47

Closed
2 tasks done
TheAngryByrd opened this issue Apr 30, 2023 · 1 comment · Fixed by #50
Closed
2 tasks done

Flexible parameter generation issue #47

TheAngryByrd opened this issue Apr 30, 2023 · 1 comment · Fixed by #50

Comments

@TheAngryByrd
Copy link

Issue created from telplin-online

Implementation

namespace FsToolkit.ErrorHandling

[<AutoOpen>]
module ResultCE =
    type ResultBuilder() =
        member inline _.Return(value: 'ok) : Result<'ok, 'error> = Ok value

[<AutoOpen>]
module ResultCEExtensions =

    type ResultBuilder with

        /// <summary>
        /// Needed to allow `for..in` and `for..do` functionality
        /// </summary>
        member inline _.Source(s: #seq<_>) : #seq<_> = s

Signature

namespace FsToolkit.ErrorHandling

[<AutoOpen>]
module ResultCE =
    type ResultBuilder =
        new: unit -> ResultBuilder
        member inline Return: value: 'ok -> Result<'ok, 'error>

[<AutoOpen>]
module ResultCEExtensions =
    type ResultBuilder with

        /// <summary>
        /// Needed to allow `for..in` and `for..do` functionality
        /// </summary>
        member inline Source: s: #seq<_> -> 'a when 'a :> seq<'b>

Problem description

(16, 24) (16,30)errorFS0034
Module 'FsToolkit.ErrorHandling.ResultCEExtensions' contains member ResultBuilder.Source<'a,'b when 'a :> seq<'b>> : s: 'a -> 'a when 'a :> seq<'b> but its signature specifies member ResultBuilder.Source<'a0,'a1,'a,'b when 'a0 :> seq<'a1> and 'a :> seq<'b>> : s: #seq<'a1> -> #seq<'b> The respective type parameter counts differ

Extra information

  • The proposed signature has problems.
  • I or my company would be willing to help fix this.
@TheAngryByrd TheAngryByrd changed the title <Insert meaningful title> Flexible parameter generation issue Apr 30, 2023
@nojaf
Copy link
Owner

nojaf commented May 1, 2023

Hi Jimmy, thanks for the issue report.
Everybody gets one: #50

Cheers

@nojaf nojaf closed this as completed in #50 May 1, 2023
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.

2 participants