-
Notifications
You must be signed in to change notification settings - Fork 24
Support F# 4.1 Result type #131
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
Comments
@jbrestan super interesting, thanks for reporting! I expect |
Thanks for quick response. Let me know if you need more details to reproduce it - I've encountered this during relatively large project migration so it's possible something else is the root cause. When I use a custom Result type (just a regular DU with two cases) everything works though (with older 4.4.0.0 FSharp.Core as well as with the latest). I'll try to look around your codebase to see if I'd be able to help Update: |
I only looked at this very briefly, but it's vaguely possible there is a bug in F# quotations here - let me know if that's the case - (I hope not of course...) |
Hi @dsyme - Unquote has never supported However, I am not sure if it is surprising that a quotation involving pattern matching on a struct union includes an
Notably, I get a compiler error with the following similar pattern match on a struct tuple:
|
@stephen-swensen Can you add a bug at http://github.com/Microsoft/visualfsharp please? We'd expect these to both work, thanks |
@dsyme done: dotnet/fsharp#3118 |
Looks like this was fixed by dotnet/fsharp#3227 , closing |
@stephen-swensen Thanks for reporting the problem |
Uh oh!
There was an error while loading. Please reload this page.
Using Unquote 3.2.0 with FSharp.Core 4.4.1.0 (F# 4.1), the following test
where
Result
isMicrosoft.FSharp.Core.Result
, fails withI think this may be related to the fact that FSharpResult is a multi-case discriminated union struct. I've just started migrating to F# 4.1, so I am really mostly guessing here.
Using this equality check seems to work
test <@ actual = Ok "foo" @>
, but in my actual tests the value in Result cannot have equality, so I need to use match.The text was updated successfully, but these errors were encountered: