 	private func quote(n: Int) -> Term {
 		return analysis(
 			ifType: const(.type),
+			ifConstant: {
+				Term.constant($0, $1.quote(n))
+			},
 			ifFree: {
 				$0.analysis(
 					ifGlobal: const(Term.free($0)),
 					ifLocal: const(Term.free($0)),
 					ifQuote: Term.bound)
-			},
-			ifConstant: {
-				Term.constant($0, $1.quote(n))
 			},
 			ifPi: { type, f in
 				f(.Free(.Quote(n))).either(

	public var debugDescription: String {
		return analysis(
			ifType: const("Type"),
			ifFree: toDebugString,
			ifConstant: { "\(toDebugString($0)) : \(toDebugString($1))" },
			ifPi: { "(Π ? : \(toDebugString($0)) . \(toDebugString($1)))" },
			ifSigma: { "(Σ ? : \(toDebugString($0)) . \(toDebugString($1)))" })
	}


	public func analysis<T>(
		ifType: (() -> T)? = nil,
		ifConstant: ((Any, Value) -> T)? = nil,
		ifFree: (Name -> T)? = nil,
		ifPi: ((Value, Value -> Either<Error, Value>) -> T)? = nil,
		ifSigma: ((Value, Value -> Either<Error, Value>) -> T)? = nil,
		@noescape otherwise: () -> T) -> T {
		return analysis(
			ifType: { ifType?() ?? otherwise() },
			ifConstant: { ifConstant?($0) ?? otherwise() },
			ifFree: { ifFree?($0) ?? otherwise() },
			ifPi: { ifPi?($0) ?? otherwise() },
			ifSigma: { ifSigma?($0) ?? otherwise() })
	}
