1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 11:02:26 +03:00

🔥 FreeConvertible.

This commit is contained in:
Rob Rix 2015-10-16 09:20:14 -04:00
parent c5fe7bec46
commit b43badaf04

View File

@ -204,21 +204,4 @@ extension Free where A: CustomJSONConvertible {
}
// MARK: - FreeConvertible
/// A hack to work around the unavailability of same-type requirements.
public protocol FreeConvertible {
typealias RollType
typealias PureType
init(free: Free<RollType, PureType>)
var free: Free<RollType, PureType> { get }
}
extension Free: FreeConvertible {
public init(free: Free<A, B>) { self = free }
public var free: Free { return self }
}
import Prelude