anchor.diff:          // (this behaviour is undocumented in F# but it seems to be how it works).
           
           // list of #I directives so far (populated while encountering those in order)
  +        // TODO: replace by List.fold if possible
           let includesSoFar = new System.Collections.Generic.List<_>()
           let pushInclude = includesSoFar.Add
   
           // those might need to be abstracted away from real filesystem operations
  -        let fileExists = System.IO.File.Exists
  -        let directoryExists = System.IO.Directory.Exists
  -        let isPathRooted = System.IO.Path.IsPathRooted
  -        let getDirectoryOfFile filename = (new System.IO.FileInfo(filename)).Directory.FullName
  -        let getRootedDirectory dirname = (new System.IO.DirectoryInfo(dirname)).FullName
  -        let combinePaths p1 p2 = System.IO.Path.Combine(p1, p2)
  +        let fileExists = File.Exists
  +        let directoryExists = Directory.Exists
  +        let isPathRooted = Path.IsPathRooted
  +        let getDirectoryOfFile = Path.GetFullPathSafe >> Path.GetDirectoryName
  +        let getRootedDirectory = Path.GetFullPathSafe
           let makeRootedDirectoryIfNecessary directory =
               if not (isPathRooted directory) then
                   getRootedDirectory directory
  
positive.code: 
                                  else
  
                                      // match first include which seemingly have the file found
                                      let maybeDirectory =
                                          includesSoFar 
                                          |> Seq.tryFind (
                                              function
                                              | ResolvedDirectory d -> combinePaths d f |> fileExists
                                              | _ -> false                                      
                                          )
                                      match maybeDirectory with
                                      | None -> () // can't load this file even using any of the #I directives...
                                      | Some (ResolvedDirectory d) ->
                                          yield Load ((ExistingFile (combinePaths d f), range))
  
                      | _ -> ()
              |]
  
negative.code: 
  
  module HashDirectiveInfo =
      open System.IO
      type IncludeDirective =
          | ResolvedDirectory of string
  
      type LoadDirective =
          | ExistingFile of string
          | UnresolvableFile of string * previousIncludes : string array
  
      [<NoComparison>]
      type Directive =
  