anchor.diff:  
   open System.Diagnostics
   open LanguagePrimitives
  +open ExtCore
  +open ExtCore.Collections
  +open ExtCore.Control
  +open ExtCore.Control.Collections
   open SpecializedCollections
   
   (*  Turn off warning about uppercase variable identifiers;
  
positive.code: // Add more members to Regex
  type Regex with
      //
      static member private DerivativeClassesImpl regex cont =
          match regex with
          | Epsilon ->
              DerivativeClasses.Universe
              |> cont
          | Any ->
              { DerivativeClasses.Universe
                  with HasEmptySet = true; }
              |> cont
          | CharacterSet charSet ->
              { HasEmptySet = false;
                Elements = charSet;
                Negated = charSet; }
              |> cont
          | Negate r
          | Star r ->
              Regex.DerivativeClassesImpl r cont
          | Concat (r, s) ->
              if not <| Regex.IsNullable r then
                  Regex.DerivativeClassesImpl r cont
              else
                  Regex.DerivativeClassesImpl r <| fun ``C(r)`` ->
                  Regex.DerivativeClassesImpl s <| fun ``C(s)`` ->
                      DerivativeClasses.Intersect (``C(r)``, ``C(s)``)
                      |> cont
          | Or (r, s)
          | And (r, s) ->
              Regex.DerivativeClassesImpl r <| fun ``C(r)`` ->
              Regex.DerivativeClassesImpl s <| fun ``C(s)`` ->
                  DerivativeClasses.Intersect (``C(r)``, ``C(s)``)
                  |> cont
  
      /// Computes an approximate set of derivative classes for the specified Regex.
      static member DerivativeClasses (regex : Regex) =
  
negative.code: // Add additional members to Regex.
  type Regex with
      //
      static member private IsNullableImpl regex =
          Cps.cont {
          match regex with
          | Epsilon
          | Star _ ->
              return true
          | Any
          | CharacterSet _ ->
              return false
          | Negate regex ->
              let! result = Regex.IsNullableImpl regex
              return not result
          | Concat (a, b)
          | And (a, b) ->
              // IsNullable(a) && IsNullable(b)
              let! aNullable = Regex.IsNullableImpl a
              if aNullable then
                  return! Regex.IsNullableImpl b
              else
                  return false
          | Or (a, b) ->
              // IsNullable(a) || IsNullable(b)
              let! aNullable = Regex.IsNullableImpl a
              if aNullable then
                  return true
              else
                  return! Regex.IsNullableImpl b
          }
  
      /// Determines if a specified Regex is 'nullable',
      /// i.e., it accepts the empty string (epsilon).
  