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

Decompiler Bug: active patterns don't produce correct F# code #11

Closed
GoogleCodeExporter opened this issue Jun 21, 2015 · 4 comments
Closed

Comments

@GoogleCodeExporter
Copy link

For example,

val it : unit = ()
> source 
        <@  
            match "hello world" with
            | InterpretedMatch @"llo" _ -> true
            | _ -> false
        @>;;
val it : string =
  "let matchValue = "hello world" in let activePatternResult = RegexUtils.|InterpretedMatch|_| "llo" matchValue in (match activePatternResult with | Some(_) -> true | _ -> false) && true"

However, as we learned with UnionCaseTest, the best output we can produced for 
even "simple" discriminant union or here active pattern pattern matching 
expressions is too complex to be helpful, therefore we urge Unquote users to 
avoid pattern matching in assertions and give this issue Low priority.

Original issue reported on code.google.com by stephen....@gmail.com on 21 Feb 2011 at 3:18

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

No branches or pull requests

1 participant