Skip to content

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

@GoogleCodeExporter

Description

@GoogleCodeExporter
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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions