mirror of
https://github.com/github/semantic.git
synced 2024-11-29 11:02:26 +03:00
16 lines
231 B
Swift
16 lines
231 B
Swift
/// The type of terms.
|
|
public protocol TermType {
|
|
typealias LeafType
|
|
|
|
var out: Syntax<Self, LeafType> { get }
|
|
}
|
|
|
|
|
|
extension Fix: TermType {}
|
|
|
|
extension Cofree: TermType {
|
|
public var out: Syntax<Cofree, A> {
|
|
return unwrap
|
|
}
|
|
}
|