 
 
 	case Definition(String, Expression<Recur>, Expression<Recur>)
-	case Datatype(String, DatatypeHelper)
+	case Datatype(String, Manifold.Datatype<Recur>)
 }
 
 extension Declaration where Recur: TermType {

		case let .Definition(symbol, type, value):
			return [ (symbol, type, value) ]
		case let .Datatype(symbol, datatype):
			let recur: Expression<Description> = .Variable(.Global(symbol))
			let description = Description(datatype: datatype)

			func type(description: Description) -> Expression<Description> {
				switch description {
				case .End:
					return recur
				case .Recursive:
					return recur
				case let .Pure(a):
					return a()
				case let .Argument(t, continuation):
					var variable: Expression<Description> = 0
					let body = continuation(Description { variable })
					let n = type(body).maxBoundVariable + 1
					variable = recur
					return .Lambda(n, t, body)
				}
			}

			func definitions(branches: [(String, Description)], transform: Expression<Recur> -> Expression<Recur>) -> [DefinitionType] {
				switch branches.count {
				case 0:
					return []
				case 1:
					return [ (symbol: branches[0].0, type: type(branches[0].1).map(Recur.init), value: transform(branches[0].1.value(recur).map(Recur.init))) ]
				default:
					return [ (symbol: branches[0].0, type: type(branches[0].1).map(Recur.init), value: transform(.Product(.Boolean(true), Recur(branches[0].1.value(recur).map(Recur.init))))) ]
						+ definitions(Array(branches.dropFirst()), transform: transform >>> { .Product(.Boolean(false), Recur($0)) })
				}
			}

			return [ (symbol, .Type(0), description.type(recur).map(Recur.init)) ]
				+ definitions(datatype.branches, transform: id)
		}
	}


		case let .Definition(_, _, value):
			return value
		case let .Datatype(_, datatype):
			return datatype.value(.Variable(.Global(symbol))).out
		}
	}

