Problem decompiling F# binaries

Problem decompiling F# binaries

Postby sn » Fri Sep 06, 2013 12:41 am

I have an F# executable that I am inspecting using Reflector 8.2 (I am using .Net 4.5). I have selected the F# option. When I select a function (I have very few methods), right click and selecting "Decompile' appears to do nothing, but something that looks like F# appears on the right hand side but completely devoid of any identifiers used in the function. In fact it appears to unfold all the local lets! Below is an example:

Code: Select all
    let mkRewriteRules vars_to_rename_as_terms =
      let ext = (gensym EXT)                 
      let renamed_vars_as_terms = (fun (ID s)-> ID(s+ext)) vars_to_rename_as_terms vars_to_rename_as_terms renamed_vars_as_terms

I see on the right hand side:

Code: Select all
   let rec mkRewriteRules vars_to_rename_as_terms  =
        let temporary1 =
            let temporary2 = (* Statement type not handled *)
            match temporary2 with
            | Some _ as x -> x
            | None ->
                let ext = Concat _ ToString
                let temporary3 = Some(Zip vars_to_rename_as_terms   vars_to_rename_as_terms)
            match temporary1 with
            | Some x -> x
            | None -> failwith "Expected non-unit return"

Is this an artifact of how the F# compiler generates, or is there some information missing that might help it do a better job (I know there is a pdb file in the same directory although i am never asked for it)

Having looked at some more functions, I really think that the de-compiler is quite messed up. Some of them are completely wrong
Posts: 1
Joined: Fri Sep 06, 2013 12:24 am

Return to .NET Reflector 7.0 Feedback

Who is online

Users browsing this forum: No registered users and 0 guests