Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file orderedTypeExt.ml
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859(**********************************************************************)(* *)(* LASCAr *)(* *)(* Copyright (c) 2017-present, Jocelyn SEROT. All rights reserved. *)(* *)(* This source code is licensed under the license found in the *)(* LICENSE file in the root directory of this source tree. *)(* *)(**********************************************************************)moduletypeT=sigincludeSet.OrderedTypevalto_string:t->stringendmodulePair(M1:T)(M2:T)=structtypet=M1.t*M2.tletcompare=compareletto_string(e1,e2)=M1.to_stringe1^","^M2.to_stringe2letmke1e2=e1,e2endmoduleTriplet(M1:T)(M2:T)(M3:T)=structtypet=M1.t*M2.t*M3.tletcompare=compareletto_string(e1,e2,e3)=M1.to_stringe1^","^M2.to_stringe2^","^M3.to_stringe3letmke1e2e3=e1,e2,e3endmoduleEither(M1:T)(M2:T)=structtypet=M1.toption*M2.toptionletcompare=compareletto_string=function(None,None)->""|(Somee1,None)->M1.to_stringe1|(None,Somee2)->M2.to_stringe2|(Somee1,Somee2)->M1.to_stringe1^","^M2.to_stringe2letmke1e2=e1,e2endmoduleEither3(M1:T)(M2:T)(M3:T)=structtypet=M1.toption*M2.toption*M3.toptionletcompare=compareletto_string=function(None,None,None)->""|(Somee1,None,None)->M1.to_stringe1|(None,Somee2,None)->M2.to_stringe2|(None,None,Somee3)->M3.to_stringe3|(Somee1,Somee2,None)->M1.to_stringe1^","^M2.to_stringe2|(Somee1,None,Somee3)->M1.to_stringe1^","^M3.to_stringe3|(None,Somee2,Somee3)->M2.to_stringe2^","^M3.to_stringe3|(Somee1,Somee2,Somee3)->M1.to_stringe1^","^M2.to_stringe2^","^M3.to_stringe3letmke1e2e3=e1,e2,e3end