Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustavo Guerra committed Nov 1, 2014
1 parent 08351a3 commit ade3491
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions src/FSharp.MetadataFormat/Main.fs
Original file line number Diff line number Diff line change
Expand Up @@ -553,19 +553,27 @@ module Reader =
// comment.

let getXmlDocSigForType (typ:FSharpEntity) =
match (typ.XmlDocSig, typ.TryFullName) with
| "", None -> ""
| "", Some(n) -> sprintf "T:%s" n
| n , _ -> n
match typ.XmlDocSig with
| "" ->
try
defaultArg
(Option.map (sprintf "T:%s") typ.TryFullName)
""
with _ -> ""
| n -> n

let getMemberXmlDocsSigPrefix (memb:FSharpMemberFunctionOrValue) =
if memb.IsProperty then "P" else "M"

let getXmlDocSigForMember (memb:FSharpMemberFunctionOrValue) =
match (memb.XmlDocSig, memb.EnclosingEntity.TryFullName) with
| "", None -> ""
| "", Some(n) -> sprintf "%s:%s.%s" (getMemberXmlDocsSigPrefix memb) n memb.CompiledName
| n, _ -> n
match memb.XmlDocSig with
| "" ->
try
defaultArg
(Option.map (fun n -> sprintf "%s:%s.%s" (getMemberXmlDocsSigPrefix memb) n memb.CompiledName) memb.EnclosingEntity.TryFullName)
""
with _ -> ""
| n -> n

//
// ---------------------------------------------------------------------
Expand Down

0 comments on commit ade3491

Please sign in to comment.