anchor.diff:          let optFilter = Some nm // used to filter the searches of the tables 
           let contentsSearchAccessible = 
              let unionCaseSearch = 
  -               if (match lookupKind with LookupKind.Expr | LookupKind.Pattern -> true | _ -> false) then 
  -                   TryFindUnionCaseOfType g typ nm 
  -               else 
  -                   None
  +               match lookupKind with 
  +               | LookupKind.Expr | LookupKind.Pattern -> TryFindUnionCaseOfType g typ nm  
  +               | _ -> None
  +
              // Lookup: datatype constructors take precedence 
              match unionCaseSearch with 
              | Some ucase -> 
                  success(resInfo,Item.UnionCase(ucase,false),rest)
              | None -> 
  +                let isLookUpExpr = lookupKind = LookupKind.Expr
                   match TryFindIntrinsicNamedItemOfType ncenv.InfoReader (nm,ad) findFlag m typ with
  -                | Some (PropertyItem psets) when (match lookupKind with LookupKind.Expr  -> true | _ -> false) -> 
  +                | Some (PropertyItem psets) when isLookUpExpr -> 
                       let pinfos = psets |> ExcludeHiddenOfPropInfos g ncenv.amap m
                       
                       // fold the available extension members into the overload resolution
  
positive.code:                 | _ -> 
                      NoResultsOrUsefulErrors
               else NoResultsOrUsefulErrors
          let res = AtMostOneResult id.idRange ( tyconSearch +++   ctorSearch +++ moduleSearch +++ raze (UndefinedName(depth,FSComp.SR.undefinedNameConstructorModuleOrNamespace,id,NoPredictions)))
          res
          
  /// Used to report a warning condition for the use of upper-case identifiers in patterns
  exception UpperCaseIdentifierInPattern of range
  
negative.code:           let tyconSearch ad = 
                let tcrefs = LookupTypeNameInEnvNoArity fullyQualified id.idText nenv
                let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref))
                let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, TypeNameResolutionInfo.ResolveToTypeRefs (TypeNameResolutionStaticArgsInfo.Indefinite), PermitDirectReferenceToGeneratedType.No, unionRanges m id.idRange)
                ResolveLongIdentInTyconRefs ncenv nenv LookupKind.Expr 1 m ad rest typeNameResInfo id.idRange tcrefs
  
            let search =
                let moduleSearch = moduleSearch ad 
                
                match moduleSearch with
                | Result res when not (List.isEmpty res) -> moduleSearch
                | _ ->
  
                let tyconSearch = tyconSearch ad
  
                match tyconSearch with
                | Result res when not (List.isEmpty res) -> tyconSearch
                | _ ->
  
                let envSearch = 
                    match fullyQualified with 
                    | FullyQualified -> 
                        NoResultsOrUsefulErrors
                    | OpenQualified -> 
                        match nenv.eUnqualifiedItems.TryFind id.idText with
                        | Some (Item.UnqualifiedType _) 
                        | None -> NoResultsOrUsefulErrors
                        | Some res -> OneSuccess (resInfo,FreshenUnqualifiedItem ncenv m res,rest)
  
                moduleSearch +++ tyconSearch +++ envSearch
  
            let resInfo,item,rest = 
                match AtMostOneResult m search with 
                | Result _ as res -> 
                    ForceRaise res
                | _ ->
                    let innerSearch =
                        let moduleSearch = moduleSearch AccessibleFromSomeFSharpCode
                
                        match moduleSearch with
                        | Result res when not (List.isEmpty res) -> moduleSearch
                        | _ ->
  
                        let tyconSearch = tyconSearch AccessibleFromSomeFSharpCode
  
                        match tyconSearch with
                        | Result res when not (List.isEmpty res) -> tyconSearch
                        | _ ->
  
                        let failingCase = raze (UndefinedName(0,FSComp.SR.undefinedNameValueNamespaceTypeOrModule,id,NoPredictions))
  
                        search +++ moduleSearch +++ tyconSearch +++ failingCase
  
                    ForceRaise (AtMostOneResult m innerSearch)
            ResolutionInfo.SendToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item))
            item,rest
  
  