This project is read-only.
1
Vote

Bug: Metadata API: problem with flexible types

description

open FSharp.PowerPack.Metadata
 
module Main =
 
let tryFindInAssembly name (assembly:FSharpAssembly) =
  Seq.collect (fun (entities:FSharpEntity) -> entities.MembersOrValues ) assembly.Entities
  |> Seq.tryFind (fun memberOrValue -> memberOrValue.DisplayName = name)
 
let findAndDisplay name =
  let valArray2D = tryFindInAssembly name FSharp.PowerPack.Metadata.FSharpAssembly.FSharpLibrary
 
  match valArray2D with
  | Some (value) -> printfn "Name: %s.%s" value.EnclosingEntity.DisplayName value.DisplayName
                    Seq.iter (fun (elem:FSharpGenericParameter) -> printfn "Generic param: %s" elem.Name) value.GenericParameters

  | None -> printfn "%s not found." name
  printfn ""
 
findAndDisplay "dict"
findAndDisplay "printf"
findAndDisplay "array2D"
 
When executed, this produces:
 
Name: ExtraTopLevelOperators.dict
Generic param: Key
Generic param: Value
 
Name: Printf.printf
Generic param: T
 
Name: ExtraTopLevelOperators.array2D
Generic param: ?2696
Generic param: T
 
Expected: Instead of ?2696, it should display #seq<'T> I think

comments

SharpAnderson wrote May 18, 2016 at 6:43 AM

Keeping in mind the end goal to make a fitting arrangement of metadata for this engineering, the last result should contain an exhaustive scope of qualities that can address each of these required strides, whether calling the examining API or the information API. dissertation assistance | DissertationTime. So as to show this point, here is a one next to the other correlation of a delta show and the relating delta record.