anchor.diff:  
   let rec internal writeModule isTopLevel ctx (modul: FSharpEntity) =
       Debug.Assert(modul.IsFSharpModule, "The entity should be a valid F# module.")  
  -    if not isTopLevel then
  -        writeDocs ctx.Writer modul.XmlDoc (fun _ -> modul.XmlDocSig) ctx.GetXmlDocBySignature
  -        writeAttributes ctx ctx.Writer (Some modul) modul.Attributes
  -        ctx.Writer.WriteLine("module {0} = ", QuoteIdentifierIfNeeded modul.LogicalName)   
  -        ctx.Writer.Indent ctx.Indentation
  -
  -    if ctx.BlankLines.BeforeMemberOrFunctionOrValue < 1 && modul.MembersFunctionsAndValues.Count > 0 then
  -        ctx.Writer.WriteLine("")
  -    for value in modul.MembersFunctionsAndValues do
  -        writeFunctionOrValue ctx value
  -
  -    if not (Seq.isEmpty modul.PublicNestedEntities) then
  -        ctx.Writer.WriteLine("")
  -
  -    for entity in modul.PublicNestedEntities do
  -        match entity with
  -        | FSharpModule -> writeModule false ctx entity
  -        | AbbreviatedType abbreviatedType -> writeTypeAbbrev true ctx entity abbreviatedType
  -        | FSharpException -> writeFSharpExceptionType true ctx entity
  -        | Delegate when entity.IsFSharp -> writeDelegateType true ctx entity
  -        | _ -> writeType true ctx entity
  -
  -        ctx.Writer.WriteLine("")
  -    if not isTopLevel then
  -        ctx.Writer.Unindent ctx.Indentation
  -
  -    if isTopLevel then
  -        writeModuleHeader ctx modul
  +    if ctx.Filterer.ModuleFilter modul then
  +        if not isTopLevel then
  +            writeDocs ctx.Writer modul.XmlDoc (fun _ -> modul.XmlDocSig) ctx.GetXmlDocBySignature
  +            writeAttributes ctx ctx.Writer (Some modul) modul.Attributes
  +            ctx.Writer.WriteLine("module {0} = ", QuoteIdentifierIfNeeded modul.LogicalName)   
  +            ctx.Writer.Indent ctx.Indentation
  +
  +        if modul.MembersFunctionsAndValues.Count > 0 then
  +            ctx.Writer.WriteBlankLines ctx.BlankLines.BeforeMembersFunctionsAndValues
  +        for value in modul.MembersFunctionsAndValues do
  +            writeFunctionOrValue ctx value
  +
  +        if not (Seq.isEmpty modul.PublicNestedEntities) then
  +            ctx.Writer.WriteBlankLines ctx.BlankLines.BeforePublicNestedEntities
  +
  +        for entity in modul.PublicNestedEntities do
  +            match entity with
  +            | FSharpModule -> writeModule false ctx entity
  +            | AbbreviatedType abbreviatedType -> writeTypeAbbrev true ctx entity abbreviatedType
  +            | FSharpException -> writeFSharpExceptionType true ctx entity
  +            | Delegate when entity.IsFSharp -> writeDelegateType true ctx entity
  +            | _ -> writeType true ctx entity
  +
  +            ctx.Writer.WriteBlankLines ctx.BlankLines.AfterPublicNestedEntity
  +        if not isTopLevel then
  +            ctx.Writer.Unindent ctx.Indentation
  +
  +        if isTopLevel then
  +            writeModuleHeader ctx modul
   
   /// Write open declarations, XmlDoc and attributes of modules to a separate buffer.
   /// It supposes to be called after all internal details have been written.
  
positive.code:     |> Seq.choose (fun (openDecl, isUsed) -> if isUsed then Some openDecl else None)
      |> Seq.iteri (fun i decl ->
          if i = 0 then 
              writer.WriteLine("")
          writer.WriteLine("open {0}", decl)) 
  
  and internal getParentPath (entity: FSharpEntity) =
  
negative.code:                 ctx.Writer.Write(" * ")
              writeUnionCaseField ctx field)
  
      ctx.Writer.WriteBlankLines ctx.BlankLines.AfterUnionCase
  
  and internal formatAttribute ctx (attribute: FSharpAttribute) =
      let definition = attribute.Format(ctx.DisplayContext)
  