anchor.diff:                  | None -> XmlDoc.EmptyDoc
               else Lookup(xmlDocSig, symbolUse.Symbol.Assembly.FileName)
   
  +    let getUnioncaseSignature displayContext (unionCase:FSharpUnionCase) =
  +        if unionCase.UnionCaseFields.Count > 0 then
  +           let typeList =
  +              unionCase.UnionCaseFields
  +              |> Seq.map (fun unionField -> unionField.Name ++ asType Symbol ":" ++ asType UserType (escapeText (unionField.FieldType.Format displayContext)))
  +              |> String.concat (asType Symbol " * " )
  +           unionCase.Name ++ asType Keyword "of" ++ typeList
  +         else unionCase.Name
  +
  +    let getEntitySignature displayContext (fse: FSharpEntity) =
  +        let modifier =
  +            match fse.Accessibility with
  +            | a when a.IsInternal -> asType Keyword "internal "
  +            | a when a.IsPrivate -> asType Keyword "private "
  +            | _ -> ""
  +
  +        let typeName =
  +            match fse with
  +            | _ when fse.IsFSharpModule -> "module"
  +            | _ when fse.IsEnum         -> "enum"
  +            | _ when fse.IsValueType    -> "struct"
  +            | _                         -> "type"
  +
  +        let enumtip () =
  +            asType Symbol " =" + "\n" + 
  +            asType Symbol "|" ++
  +            (fse.FSharpFields
  +            |> Seq.filter (fun f -> not f.IsCompilerGenerated)
  +            |> Seq.map (fun field -> match field.LiteralValue with
  +                                     | Some lv -> field.Name + asType Symbol " = " + asType Number (string lv)
  +                                     | None -> field.Name )
  +            |> String.concat ("\n" + asType Symbol "| " ) )
  +
  +
  +        let uniontip () = 
  +            asType Symbol " =" + "\n" + 
  +            asType Symbol "|" ++
  +            (fse.UnionCases 
  +            |> Seq.map (getUnioncaseSignature displayContext)
  +            |> String.concat ("\n" + asType Symbol "| " ) )
  +                                 
  +        let typeDisplay = modifier + asType Keyword typeName ++ asType UserType fse.DisplayName
  +        let fullName = "\n\nFull name: " + fse.FullName
  +        match fse.IsFSharpUnion, fse.IsEnum with
  +        | true, false -> typeDisplay + uniontip () + fullName
  +        | false, true -> typeDisplay + enumtip () + fullName
  +        | _ -> typeDisplay + fullName
  +
  +    let getFuncSignature displayContext (func: FSharpMemberFunctionOrValue) =
  +        let backupSignature = func.FullType.Format displayContext
  +        let argInfos =
  +            func.CurriedParameterGroups 
  +            |> Seq.map Seq.toList 
  +            |> Seq.toList 
  +
  +        let retType = asType UserType (escapeText(func.ReturnParameter.Type.Format displayContext))
  +
  +        //example of building up the parameters using Display name and Type
  +        let signature =
  +            let padLength = 
  +                let allLengths = argInfos |> List.concat |> List.map (fun p -> p.DisplayName.Length)
  +                match allLengths with
  +                | [] -> 0
  +                | l -> l |> List.max
  +
  +            match argInfos with
  +            | [] -> "   " + retType //When does this occur, val type within  module?
  +            | [[]] -> "   " + retType //A ctor with () parameters seems to be a list with an empty list
  +            | many ->
  +                let allParams =
  +                    many
  +                    |> List.map(fun listOfParams ->
  +                                    listOfParams
  +                                    |> List.map(fun (p:FSharpParameter) -> "   " + p.DisplayName.PadRight (padLength) + asType Symbol ":" ++ asType UserType (escapeText (p.Type.Format displayContext)))
  +                                    |> String.concat (asType Symbol " *" ++ "\n"))
  +                    |> String.concat (asType Symbol " ->" + "\n") 
  +                allParams +  "\n   " + (String.replicate (max (padLength-1) 0) " ") +  asType Symbol "->" ++ retType
  +
  +
  +        let modifiers =
  +            let accessibility =
  +                match func.Accessibility with
  +                | a when a.IsInternal -> asType Keyword "internal"
  +                | a when a.IsPrivate -> asType Keyword "private"
  +                | _ -> ""
  +
  +            let modifier =
  +                //F# types are prefixed with new, should non F# types be too for consistancy?
  +                if isConstructor func then
  +                    if func.EnclosingEntity.IsFSharp then "new" ++ accessibility
  +                    else accessibility
  +                elif func.IsMember then 
  +                    if func.IsInstanceMember then
  +                        if func.IsDispatchSlot then "abstract member" ++ accessibility
  +                        else "member" ++ accessibility
  +                    else "static member" ++ accessibility
  +                else
  +                    if func.InlineAnnotation = FSharpInlineAnnotation.AlwaysInline then "val" ++ accessibility ++ "inline"
  +                    elif func.IsInstanceMember then "val" ++ accessibility
  +                    else "val" ++ accessibility //does this need to be static prefixed?
  +            modifier
  +        let functionName =
  +            if isConstructor func then func.EnclosingEntity.DisplayName
  +            else func.DisplayName
  +        asType Keyword modifiers ++ functionName ++ asType Symbol ":" + "\n" + signature
  +
  +    let getValSignature displayContext (v:FSharpMemberFunctionOrValue) =
  +        let retType = asType UserType (escapeText(v.ReturnParameter.Type.Format displayContext))
  +        let prefix = 
  +            if v.IsMutable then asType Keyword "val" ++ asType Keyword "mutable"
  +            else asType Keyword "val"
  +        prefix ++ v.DisplayName ++ asType Symbol ":" ++ retType
  +
  +    let getFieldSignature displayContext (field: FSharpField) =
  +        let retType = asType UserType (escapeText(field.FieldType.Format displayContext))
  +        match field.LiteralValue with
  +        | Some lv -> field.DisplayName ++ asType Symbol ":" ++ retType ++ asType Symbol "=" ++ asType Number (string lv)
  +        | None ->
  +            let prefix = 
  +                if field.IsMutable then asType Keyword "val" ++ asType Keyword "mutable"
  +                else asType Keyword "val"
  +            prefix ++ field.DisplayName ++ asType Symbol ":" ++ retType
  +
       let getTooltipFromSymbol (symbolUse:FSharpSymbolUse option) editor (backUpSig: Lazy<_>) =
           match symbolUse with
           | Some symbolUse -> 
               match symbolUse.Symbol with
               | :? FSharpEntity as fse ->
                   try
  -                    let displayName = fse.DisplayName
  -
  -                    let modifier = match fse.Accessibility with
  -                                   | a when a.IsInternal -> Highlight.asKeyword "internal "
  -                                   | a when a.IsPrivate -> Highlight.asKeyword "private "
  -                                   | _ -> ""
  -
  -                    let attributes =
  -                        // Maybe search for modifier attributes like abstract, sealed and append them above the type:
  -                        // [<Abstract>]
  -                        // type Test = ...
  -                        String.Join ("\n", fse.Attributes 
  -                                           |> Seq.map (fun a -> let name = a.AttributeType.DisplayName.Replace("Attribute", "")
  -                                                                let parameters = String.Join(", ",  a.ConstructorArguments |> Seq.filter (fun ca -> ca :? string ) |> Seq.cast<string>)
  -                                                                if String.IsNullOrWhiteSpace parameters then "[<" + name + ">]"
  -                                                                else "[<" + name + "( " + parameters + " )" + ">]" ) 
  -                                           |> Seq.toArray)
  -
  -                    let signature =
  -                        let typeName =
  -                            match fse with
  -                            | _ when fse.IsFSharpModule -> "module"
  -                            | _ when fse.IsEnum         -> "enum"
  -                            | _ when fse.IsValueType    -> "struct"
  -                            | _                         -> "type"
  -
  -                        let enumtip () =
  -                            Highlight.asSymbol " =" + "\n" + 
  -                            Highlight.asSymbol "|" ++
  -                            (fse.FSharpFields
  -                            |> Seq.filter (fun f -> not f.IsCompilerGenerated)
  -                            |> Seq.map (fun field -> field.Name) //TODO Fix FSC to expose enum filed literals: field.Name + (hl " = " cs.KeywordOperators) + hl field.LiteralValue cs.UserTypesValueTypes*)
  -                            |> String.concat ("\n" + Highlight.asSymbol "| " ) )
  -           
  -
  -                        let uniontip () = 
  -                            Highlight.asSymbol " =" + "\n" + 
  -                            Highlight.asSymbol "|" ++
  -                            (fse.UnionCases 
  -                            |> Seq.map (fun unionCase -> 
  -                                            if unionCase.UnionCaseFields.Count > 0 then
  -                                               let typeList =
  -                                                  unionCase.UnionCaseFields
  -                                                  |> Seq.map (fun unionField -> unionField.Name ++ Highlight.asSymbol ":" ++ Highlight.asUserType (escapeText (unionField.FieldType.Format symbolUse.DisplayContext)))
  -                                                  |> String.concat (Highlight.asSymbol " * " )
  -                                               unionCase.Name ++ Highlight.asKeyword "of" ++ typeList
  -                                             else unionCase.Name)
  -
  -                            |> String.concat ("\n" + Highlight.asSymbol "| " ) )
  -                                                 
  -                        let typeDisplay = modifier + Highlight.asKeyword typeName ++ Highlight.asUserType displayName
  -                        let fullName = "\n\nFull name: " + fse.FullName
  -                        match fse.IsFSharpUnion, fse.IsEnum with
  -                        | true, false -> typeDisplay + uniontip () + fullName
  -                        | false, true -> typeDisplay + enumtip () + fullName
  -                        | _ -> typeDisplay + fullName
  -
  +                    let signature = getEntitySignature symbolUse.DisplayContext fse
                       ToolTip(signature, getSummaryFromSymbol symbolUse backUpSig, getSegFromSymbolUse editor symbolUse)
                   with exn -> ToolTips.EmptyTip
   
  
positive.code: 
  [<AutoOpen>]
  module FSharpTypeExt =
      let isOperator (name: string) =
              if name.StartsWith "( " && name.EndsWith " )" && name.Length > 4 then
                  name.Substring (2, name.Length - 4) |> String.forall (fun c -> c <> ' ')
              else false
  
negative.code:                 try
                  if func.CompiledName = ".ctor" then 
                      if func.EnclosingEntity.IsValueType || func.EnclosingEntity.IsEnum then
                          //ValueTypes
                          let signature = getFuncSignature symbolUse.DisplayContext func
                          ToolTip(signature, getSummaryFromSymbol symbolUse backUpSig, getSegFromSymbolUse editor symbolUse)
                          //ToolTips.EmptyTip
                      else
                          //ReferenceType constructor
                          let signature = getFuncSignature symbolUse.DisplayContext func
                          ToolTip(signature, getSummaryFromSymbol symbolUse backUpSig, getSegFromSymbolUse editor symbolUse)
                          //ToolTips.EmptyTip
  
                  elif func.FullType.IsFunctionType && not func.IsPropertyGetterMethod && not func.IsPropertySetterMethod && not symbolUse.IsFromComputationExpression then 
                      if isOperatorOrActivePattern func.DisplayName then
                          //Active pattern or operator
                          let signature = getFuncSignature symbolUse.DisplayContext func
                          ToolTip(signature, getSummaryFromSymbol symbolUse backUpSig, getSegFromSymbolUse editor symbolUse)
                      else
                          //TODO: Add closure/nested functions
                          if not func.IsModuleValueOrMember then
                              //represents a closure or nested function, needs FCS support
                              ToolTips.EmptyTip
                          else
                              let signature = getFuncSignature symbolUse.DisplayContext func
                              ToolTip(signature, getSummaryFromSymbol symbolUse backUpSig, getSegFromSymbolUse editor symbolUse)                            
  
                  else
                      //val name : Type
                      let signature = getValSignature symbolUse.DisplayContext func
                      ToolTip(signature, getSummaryFromSymbol symbolUse backUpSig, getSegFromSymbolUse editor symbolUse)
                  with exn -> ToolTips.EmptyTip
  
              | :? FSharpField as fsf ->
                  let signature = getFieldSignature symbolUse.DisplayContext fsf
                  ToolTip(signature, getSummaryFromSymbol symbolUse backUpSig, getSegFromSymbolUse editor symbolUse)
  
              | :? FSharpUnionCase as uc ->
                  let signature = getUnioncaseSignature symbolUse.DisplayContext uc
                  ToolTip(signature, getSummaryFromSymbol symbolUse backUpSig, getSegFromSymbolUse editor symbolUse)
  
              | :? FSharpActivePatternCase as apc ->
                  //Theres not enough information to build this
                  ToolTips.EmptyTip
                 
              | _ -> ToolTips.EmptyTip
  
          | None -> ToolTips.EmptyTip
  