 import Foundation
 import JSONUtilities
 
-public struct BuildRule {
+public struct BuildRule: Equatable {
 
     public static let scriptCompilerSpec = "com.apple.compilers.proxy.script"
     public static let filePatternFileType = "pattern.proxy"

        self.name = name
        self.outputFiles = outputFiles
        self.outputFilesCompilerFlags = outputFilesCompilerFlags
    }
}

extension BuildRule: Equatable {

    public static func == (lhs: BuildRule, rhs: BuildRule) -> Bool {
        return lhs.outputFiles == rhs.outputFiles &&
            lhs.outputFilesCompilerFlags == rhs.outputFilesCompilerFlags &&
            lhs.fileType == rhs.fileType &&
            lhs.action == rhs.action &&
            lhs.name == rhs.name
    }
}


            case .pattern(let pattern): return pattern
            }
        }
    }

    public enum Action: Equatable {
