mirror of
https://github.com/github/semantic.git
synced 2024-12-21 05:41:54 +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
|
|
}
|
|
}
|