mirror of
https://github.com/github/semantic.git
synced 2024-11-29 11:02:26 +03:00
Add a Syntax to Cofree.
This commit is contained in:
parent
0d662ade08
commit
59dd626361
@ -1,7 +1,7 @@
|
||||
// Copyright © 2015 GitHub. All rights reserved.
|
||||
|
||||
public enum Cofree<B> {
|
||||
case Unroll(B)
|
||||
public enum Cofree<A, B> {
|
||||
case Unroll(B, Syntax<Cofree, A>)
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ public enum Cofree<B> {
|
||||
extension Cofree {
|
||||
var extract: B {
|
||||
switch self {
|
||||
case let .Unroll(b):
|
||||
case let .Unroll(b, _):
|
||||
return b
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user