On Sat, Jun 13, 2015 at 7:34 AM, Keean Schupke <[email protected]> wrote:
> If you really want, I can define dif in Haskell:
>
> class Dif x y where
> dif :: x -> y -> ()
>
> instance Undefined(x) => Dif x x where
> dif _ _ = undefined
>
> instance Dif x y where
> dif _ _ = undefined
>
> Where "Undefined" is any undefined type class. Due to Haskell's matching
> rules for overlapping instances the closet match wins, so dif succeeds if
> the types are different, but fails due to committed choice semantics when it
> cannot find an instance of Undefined for x.

Clever. It's not going to work very well though, since it's actually
telling us two types are not known to be equal, not that they're known
to be unequal.

I don't doubt though that your new system could provide a real
non-equality relation.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to