Skip to content

Commit

Permalink
[fix] compare: always consider TyArrow not equal instead of raising a…
Browse files Browse the repository at this point in the history
…n exception (cache related problem)
  • Loading branch information
Frederic Ye committed Dec 13, 2011
1 parent 225c631 commit f969279
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stdlib/core/compare/compare.opa
Expand Up @@ -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}



Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f969279

Please sign in to comment.