anchor.diff:      open Extensions
       open Utils
   
  -    let nullStrFunc (func : obj -> string) =
  -        fun (v : obj) -> if v <> null then func v else null
  -
       let nullableStrFunc<'a when 'a: (new: unit -> 'a)
                               and 'a :> ValueType
                               and 'a: struct> (func : 'a -> string) =
  -        fun (v : obj) ->
  +        SerializerFunc(fun (v : obj) ->
               let value : Nullable<'a> = unbox v
  -            if value.HasValue then func value.Value else null
  +            if value.HasValue then func value.Value else null)
   
       let writeGuid (v : Guid) =
           v.ToString("N")
  
positive.code: type internal AttributeWriterInfo = {
      Key : string
      GetFunc : GetterFunc
      WriteFunc : Lazy<WriterFunc> }
  
  /// Record containing all property and attribute writer
  /// information used for serialization of a specific type
  
negative.code:     let writeDateTimeOffset (v : DateTimeOffset) =
          v.ToString("o")
  
      let writeByte    (v : byte)    = v.ToString()
      let writeChar    (v : char)    = v.ToString()
      let writeDecimal (v : decimal) = v.ToString()
      let writeFloat   (v : float)   = v.ToString()
      let writeInt16   (v : int16)   = v.ToString()
      let writeInt32   (v : int)     = v.ToString()
      let writeInt64   (v : int)     = v.ToString()
      let writeSByte   (v : sbyte)   = v.ToString()
      let writeFloat32 (v : single)  = v.ToString()
      let writeUInt16  (v : uint16)  = v.ToString()
      let writeUInt32  (v : uint16)  = v.ToString()
      let writeUInt64  (v : uint64)  = v.ToString()
  
      let writeEnumNames (t: Type) =
          let under = Enum.GetUnderlyingType(t)
          match Type.GetTypeCode(under) with
          | TypeCode.Byte    -> Some <| SerializerFunc(unbox >> writeByte)
          | TypeCode.Char    -> Some <| SerializerFunc(unbox >> writeChar)
          | TypeCode.Decimal -> Some <| SerializerFunc(unbox >> writeDecimal)
          | TypeCode.Double  -> Some <| SerializerFunc(unbox >> writeFloat)
          | TypeCode.Int16   -> Some <| SerializerFunc(unbox >> writeInt16)
          | TypeCode.Int32   -> Some <| SerializerFunc(unbox >> writeInt32)
          | TypeCode.Int64   -> Some <| SerializerFunc(unbox >> writeInt64)
          | TypeCode.SByte   -> Some <| SerializerFunc(unbox >> writeSByte)
          | TypeCode.Single  -> Some <| SerializerFunc(unbox >> writeFloat32)
          | TypeCode.UInt16  -> Some <| SerializerFunc(unbox >> writeUInt16)
          | TypeCode.UInt32  -> Some <| SerializerFunc(unbox >> writeUInt32)
          | TypeCode.UInt64  -> Some <| SerializerFunc(unbox >> writeUInt64)
          | _                -> None
  
      let writeEnum (v : obj) =
          v.ToString()
  
      let getValueWriter (t: Type) : SerializerFunc option =
          if t = typeof<Nullable<DateTime>> then
              Some <| nullableStrFunc toShortestXsdFormat 
          elif t = typeof<Guid> then
              Some <| SerializerFunc(unbox >> writeGuid)
          elif t = typeof<Nullable<Guid>> then
              Some <| nullableStrFunc writeGuid
          elif t = typeof<DateTimeOffset> then
              Some <| SerializerFunc(unbox >> writeDateTimeOffset)
          elif t = typeof<Nullable<DateTimeOffset>> then
              Some <| nullableStrFunc writeDateTimeOffset
          elif t.IsEnum || t.UnderlyingSystemType.IsEnum then
              if t.HasAttribute("FlagsAttribute")
              then writeEnumNames t
              else None
          else
              match Type.GetTypeCode(t.NullableUnderlying()) with
              | TypeCode.DateTime -> Some <| SerializerFunc(unbox >> toShortestXsdFormat)
              | _ -> None
  
  /// Serialization logic for list and collection types
  module internal ListSerializer =
  