12345678910111213141516171819202122232425262728293031323334353637383940414243444546(* This file is free software, part of containers. See file "license" for more details. *)(** {1 Equality Combinators} *)type'at='a->'a->boolletpoly=Stdlib.(=)letphysical=Stdlib.(==)letint:intt=(=)letstring:stringt=Stdlib.(=)letbool:boolt=Stdlib.(=)letfloat:floatt=Stdlib.(=)letunit()()=trueletreclistfl1l2=matchl1,l2with|[],[]->true|[],_|_,[]->false|x1::l1',x2::l2'->fx1x2&&listfl1'l2'letarrayeqab=letrecauxi=ifi=Array.lengthathentrueelseeqa.(i)b.(i)&&aux(i+1)inArray.lengtha=Array.lengthb&&aux0letoptionfo1o2=matcho1,o2with|None,None->true|Some_,None|None,Some_->false|Somex,Somey->fxyletpairfg(x1,y1)(x2,y2)=fx1x2&&gy1y2lettriplefgh(x1,y1,z1)(x2,y2,z2)=fx1x2&&gy1y2&&hz1z2letmapfeqxy=eq(fx)(fy)letalways_eq__=trueletnever_eq__=falsemoduleInfix=structlet(>|=)xf=mapfxendincludeInfix