code: function verifyModules(filePaths) {
    return Promise.all(
      _.map(filePaths, function(filePath) {
        return firstline(filePath).then(function(line) {
          var matches = line.match(/^(?:(?:port|effect)\s+)?module\s+(\S+)\s*/);
  
          if (matches) {
            var moduleName = matches[1];
            var testModulePaths = moduleFromTestName(moduleName);
            var modulePath = moduleFromFilePath(filePath);
  
            // A module path matches if it lines up completely with a known one.
            if (
              !testModulePaths.every(function(testModulePath, index) {
                return testModulePath === modulePath[index];
              })
            ) {
              return Promise.reject(
                filePath +
                  ' has a module declaration of "' +
                  moduleName +
                  '" - which does not match its filename!'
              );
            }
          } else {
            return Promise.reject(
              filePath +
                ' has an invalid module declaration. Check the first line of the file and make sure it has a valid module declaration there!'
            );
          }
        });
      })
    );
  }
docs: Check for modules where the name doesn't match the filename. elm-make won't get a chance to detect this; they'll be filtered out first.