# HG changeset patch # User Adam Chlipala # Date 1220210280 14400 # Node ID 32f9212583b2dc2eecb079505d7ae0ace1c73a05 # Parent e52243e20858fb43922b0f8cf73e3e980879e393 Add 'ne' to 'eq' type class diff -r e52243e20858 -r 32f9212583b2 lib/basis.urs --- a/lib/basis.urs Sun Aug 31 15:15:41 2008 -0400 +++ b/lib/basis.urs Sun Aug 31 15:18:00 2008 -0400 @@ -11,8 +11,8 @@ class eq val eq : t ::: Type -> eq t -> t -> t -> bool +val ne : t ::: Type -> eq t -> t -> t -> bool val eq_int : eq int -val eq_float : eq float val eq_string : eq string val eq_bool : eq bool diff -r e52243e20858 -r 32f9212583b2 src/urweb.grm --- a/src/urweb.grm Sun Aug 31 15:15:41 2008 -0400 +++ b/src/urweb.grm Sun Aug 31 15:18:00 2008 -0400 @@ -605,6 +605,7 @@ (EApp (e, (EAbs (SYMBOL, NONE, eexp2), loc)), loc) end) | eexp EQ eexp (native_op ("eq", eexp1, eexp2, s (eexp1left, eexp2right))) + | eexp NE eexp (native_op ("ne", eexp1, eexp2, s (eexp1left, eexp2right))) eargs : earg (earg) | eargl (eargl) diff -r e52243e20858 -r 32f9212583b2 tests/eq.ur --- a/tests/eq.ur Sun Aug 31 15:15:41 2008 -0400 +++ b/tests/eq.ur Sun Aug 31 15:18:00 2008 -0400 @@ -3,3 +3,5 @@ fun eq_pair (t1 :: Type) (t2 :: Type) (eq1 : eq t1) (eq2 : eq t2) (x : t1 * t2) (y : t1 * t2) = x.1 = y.1 + +val b3 = True <> False