1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 21:43:07 +03:00

Unroll does not need to be indirect.

This commit is contained in:
Rob Rix 2015-10-14 10:49:05 -04:00
parent 8f3ae52d29
commit 84ea5248e3

View File

@ -6,7 +6,7 @@
///
/// This type is dual to `Free`. Where `Free` is inhabited by syntax trees where some terms are replaced with `B`s, `Cofree` is inhabited by syntax trees where all terms are annotated with `B`s. In Doubt, this allows us to e.g. annotate terms with source range information, categorization, etc.
public enum Cofree<A, B> {
indirect case Unroll(B, () -> Syntax<Cofree, A>)
case Unroll(B, () -> Syntax<Cofree, A>)
public var unwrap: Syntax<Cofree, A> {
switch self {