mirror of
https://github.com/github/semantic.git
synced 2024-11-25 21:43:07 +03:00
Convenience constructor for Interpreters with Categorizable annotations.
This commit is contained in:
parent
1e53b446ab
commit
1690c71cb2
@ -98,5 +98,11 @@ extension Interpreter where Term.LeafType: Equatable {
|
||||
}
|
||||
}
|
||||
|
||||
extension Interpreter where Term: CofreeType, Term.Annotation: Categorizable {
|
||||
public init(equal: (Term, Term) -> Bool, cost: Diff -> Int) {
|
||||
self.init(equal: equal, comparable: Interpreter.comparable { $0.extract.categories }, cost: cost)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
import Prelude
|
||||
|
Loading…
Reference in New Issue
Block a user