 	}
 }
 
+/// An abstract type representing a way to specify versions.
+public protocol VersionType: Scannable, Equatable {}
+
 /// Represents a single dependency of a project.
-public struct Dependency: Equatable {
+public struct Dependency<V: VersionType>: Equatable {
 	/// The GitHub repository in which this dependency lives.
 	public var repository: Repository
 
 	/// The version(s) that are required to satisfy this dependency.
-	public var version: VersionSpecifier
-}
-
-public func ==(lhs: Dependency, rhs: Dependency) -> Bool {
+	public var version: V
+}
+
+public func ==<V>(lhs: Dependency<V>, rhs: Dependency<V>) -> Bool {
 	return lhs.repository == rhs.repository && lhs.version == rhs.version
 }
 

/// and any other settings Carthage needs to build it.
public struct Cartfile {
	/// The dependencies listed in the Cartfile.
	public var dependencies: [Dependency]

	/// Attempts to parse Cartfile information from a string.
	public static func fromString(string: String) -> Result<Cartfile> {


		if let repoNWO = repoNWO {
			return Repository.fromNWO(repoNWO).flatMap { repo in
				return V.fromScanner(scanner).map { specifier in self(repository: repo, version: specifier) }
			}
		} else {
			return failure()
