Permalink
Browse files

[fix] compare: always consider TyArrow not equal instead of raising a…

…n exception (cache related problem)
  • Loading branch information...
1 parent 225c631 commit f969279a904ed2837bab450181ecf6ca7257acfe @Aqua-Ye Aqua-Ye committed Dec 13, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 stdlib/core/compare/compare.opa
@@ -130,6 +130,7 @@ order_ty = Order.make(@unsafe_cast(compare_ty)):order(OpaType.ty,Order.default)
@private compare_string = @nonexpansive(Magic.id(@toplevel.compare_string) :'a,'a->Order.comparison)
@private always_equal_postenv(_,_,_) = {eq}
+@private always_not_equal_postenv(_,_,_) = {neq}
@@ -343,7 +344,7 @@ compare_front(ty) =
{TyVar = _} -> lazy_error(ty,preenv)
/* Unimplemented case *********************/
- {TyArrow_params = _; TyArrow_res = _} -> lazy_error(ty,preenv)
+ {TyArrow_params = _; TyArrow_res = _} -> (always_not_equal_postenv,preenv)
/* Error case *****************************/
{TyAbstract} -> lazy_error(ty,preenv)

0 comments on commit f969279

Please sign in to comment.