1234567891011121314151617181920212223242526272829303132open!Core_kernelopen!ImportmoduleId=Type_equal.IdmoduleView=structtypet=T:'aId.t*'a->tendincludeViewletview=Fn.idletcreateidvalue=T(id,value)lettype_id_name(T(id,_))=Id.nameidlettype_id_uid(T(id,_))=Id.uididletsexp_of_t(T(id,value))=Id.to_sexpidvalueletdoes_match(T(id1,_))id2=Id.sameid1id2letmatch_(typea)(T(id1,value))(id2:aId.t)=matchId.same_witnessid1id2with|SomeType_equal.T->Some(value:a)|None->None;;letmatch_exn(typea)(T(id1,value)ast)(id2:aId.t)=matchId.same_witnessid1id2with|SomeType_equal.T->(value:a)|None->failwiths"Univ.match_exn called with mismatched value and type id"(t,id2)[%sexp_of:t*_Id.t];;