//
//  TypeEquality.swift
//  swiftz
//
//  Created by Maxwell Swadling on 19/06/2014.
//  Copyright (c) 2014 Maxwell Swadling. All rights reserved.
//

import Foundation

// For more info, see:
// http://hackage.haskell.org/package/type-equality-0.1.2/docs/Data-Type-Equality.html
protocol TypeEquality {
	typealias From
	typealias To

	func apply(a: From) -> To
}

struct Refl<X>: TypeEquality {
	typealias From = X
	typealias To = X

	func apply(a: From) -> To {
		return a
	}
}

//
//  TypeEquality.swift
//  swiftz
//
//  Created by Maxwell Swadling on 19/06/2014.
//  Copyright (c) 2014 Maxwell Swadling. All rights reserved.
//

import Foundation

// For more info, see:
// http://hackage.haskell.org/package/type-equality-0.1.2/docs/Data-Type-Equality.html
protocol TypeEquality {
	typealias From
	typealias To

	func apply(a: From) -> To
}

@final class Refl<X> : TypeEquality {
	typealias From = X
	typealias To = X

	func apply(a: From) -> To {
		return a
	}
}

--- 
+++ 
@@ -17,7 +17,7 @@
 	func apply(a: From) -> To
 }
 
-@final class Refl<X> : TypeEquality {
+struct Refl<X>: TypeEquality {
 	typealias From = X
 	typealias To = X
 
Make Refl into a struct

/cc @maxpow4h
