1
1
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:
Rob Rix 2015-10-14 09:43:51 -04:00
parent 0d662ade08
commit 59dd626361

View File

@ -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
}
}