On 12/8/05, David Roundy [EMAIL PROTECTED] wrote:
So is there some other approach that I can use for easily coercing phantom
types based on runtime checks? Any suggestions?
None here. Since H-M uses type unification to do type inference, you
can't auto-create a program based on the inferred
On Thu, Dec 08, 2005 at 09:23:22AM -0500, David Roundy wrote:
data EqContext a b = EqContext { safe_coerce :: f(a,b) - f(b,a) }
where f(a,b) is a function of two types that returns a type, so the value
of f(a,b) might be (Patch a b) or (Patch x b) or something like that.
But I'm not sure
Ralf Hinze wrote:
the type a :=: b defined below
goes back to Leibniz's principle of substituting equals for equals:
If you like this, check out two of Ralf's papers:
First-class phantom types:
http://techreports.library.cornell.edu:8081/Dienst/UI/1.0/Display/cul.cis/TR2003-1901
Fun with