mirror of
https://github.com/github/semantic.git
synced 2024-11-29 11:02:26 +03:00
🔥 FreeConvertible.
This commit is contained in:
parent
c5fe7bec46
commit
b43badaf04
@ -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
|
import Prelude
|
||||||
|
Loading…
Reference in New Issue
Block a user