123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472(*
* Copyright (c) 2014 Leo White <lpw25@cl.cam.ac.uk>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*)openPaths(** {3 Modules} *)modulerecModule:sigtypeexpansion=|AlreadyASig|SignatureofSignature.t|FunctorofFunctorParameter.tlist*Signature.ttypedecl=|AliasofPath.Module.t|ModuleTypeofModuleType.exprtypet={id:Identifier.Module.t;doc:Comment.docs;type_:decl;canonical:(Path.Module.t*Reference.Module.t)option;hidden:bool;display_type:decloption;expansion:expansionoption;}moduleEquation:sigtypet=declendend=ModuleandFunctorParameter:sigtypeparameter={id:Identifier.Module.t;expr:ModuleType.expr;expansion:Module.expansionoption;}typet=|Unit|Namedofparameterend=FunctorParameter(** {3 Modules Types} *)andModuleType:sigtypesubstitution=|ModuleEqofFragment.Module.t*Module.Equation.t|TypeEqofFragment.Type.t*TypeDecl.Equation.t|ModuleSubstofFragment.Module.t*Path.Module.t|TypeSubstofFragment.Type.t*TypeDecl.Equation.ttypeexpr=|PathofPath.ModuleType.t|SignatureofSignature.t|FunctorofFunctorParameter.t*expr|Withofexpr*substitutionlist|TypeOfofModule.decltypet={id:Identifier.ModuleType.t;doc:Comment.docs;expr:exproption;expansion:Module.expansionoption;}end=ModuleTypeandModuleSubstitution:sigtypet={id:Identifier.Module.t;doc:Comment.docs;manifest:Path.Module.t;}end=ModuleSubstitution(** {3 Signatures} *)andSignature:sigtyperecursive=|Ordinary|And|Nonrec|Rectypeitem=|Moduleofrecursive*Module.t|ModuleTypeofModuleType.t|ModuleSubstitutionofModuleSubstitution.t|Typeofrecursive*TypeDecl.t|TypeSubstitutionofTypeDecl.t|TypExtofExtension.t|ExceptionofException.t|ValueofValue.t|ExternalofExternal.t|Classofrecursive*Class.t|ClassTypeofrecursive*ClassType.t|IncludeofInclude.t|CommentofComment.docs_or_stoptypet=itemlistend=Signature(** {3 Includes} *)andInclude:sigtypeexpansion={resolved:bool;content:Signature.t;}typet={parent:Identifier.Signature.t;doc:Comment.docs;decl:Module.decl;expansion:expansion;}end=Include(** {3 Type Declarations} *)andTypeDecl:sigmoduleField:sigtypet={id:Identifier.Field.t;doc:Comment.docs;mutable_:bool;type_:TypeExpr.t;}endmoduleConstructor:sigtypeargument=|TupleofTypeExpr.tlist|RecordofField.tlisttypet={id:Identifier.Constructor.t;doc:Comment.docs;args:argument;res:TypeExpr.toption;}endmoduleRepresentation:sigtypet=|VariantofConstructor.tlist|RecordofField.tlist|Extensibleendtypevariance=|Pos|Negtypeparam_desc=|Any|Varofstringtypeparam={desc:param_desc;variance:varianceoption;injectivity:bool}moduleEquation:sigtypet={params:paramlist;private_:bool;manifest:TypeExpr.toption;constraints:(TypeExpr.t*TypeExpr.t)list;}endtypet={id:Identifier.Type.t;doc:Comment.docs;equation:Equation.t;representation:Representation.toption;}end=TypeDecl(** {3 Type extensions} *)andExtension:sigmoduleConstructor:sigtypet={id:Identifier.Extension.t;doc:Comment.docs;args:TypeDecl.Constructor.argument;res:TypeExpr.toption;}endtypet={type_path:Path.Type.t;doc:Comment.docs;type_params:TypeDecl.paramlist;private_:bool;constructors:Constructor.tlist;}end=Extension(** {3 Exception} *)andException:sigtypet={id:Identifier.Exception.t;doc:Comment.docs;args:TypeDecl.Constructor.argument;res:TypeExpr.toption;}end=Exception(** {3 Values} *)andValue:sigtypet={id:Identifier.Value.t;doc:Comment.docs;type_:TypeExpr.t;}end=Value(** {3 External values} *)andExternal:sigtypet={id:Identifier.Value.t;doc:Comment.docs;type_:TypeExpr.t;primitives:stringlist;}end=External(** {3 Classes} *)andClass:sigtypedecl=|ClassTypeofClassType.expr|ArrowofTypeExpr.labeloption*TypeExpr.t*decltypet={id:Identifier.Class.t;doc:Comment.docs;virtual_:bool;params:TypeDecl.paramlist;type_:decl;expansion:ClassSignature.toption;}end=Class(** {3 Class Types} *)andClassType:sigtypeexpr=|ConstrofPath.ClassType.t*TypeExpr.tlist|SignatureofClassSignature.ttypet={id:Identifier.ClassType.t;doc:Comment.docs;virtual_:bool;params:TypeDecl.paramlist;expr:expr;expansion:ClassSignature.toption;}end=ClassType(** {3 Class Signatures} *)andClassSignature:sigtypeitem=|MethodofMethod.t|InstanceVariableofInstanceVariable.t|ConstraintofTypeExpr.t*TypeExpr.t|InheritofClassType.expr|CommentofComment.docs_or_stoptypet={self:TypeExpr.toption;items:itemlist;}end=ClassSignature(** {3 Methods} *)andMethod:sigtypet={id:Identifier.Method.t;doc:Comment.docs;private_:bool;virtual_:bool;type_:TypeExpr.t;}end=Method(** {3 Instance variables} *)andInstanceVariable:sigtypet={id:Identifier.InstanceVariable.t;doc:Comment.docs;mutable_:bool;virtual_:bool;type_:TypeExpr.t;}end=InstanceVariable(** {3 Type expressions} *)andTypeExpr:sigmodulePolymorphic_variant:sigtypekind=|Fixed|Closedofstringlist|OpenmoduleConstructor:sigtypet={name:string;constant:bool;arguments:TypeExpr.tlist;doc:Comment.docs;}endtypeelement=|TypeofTypeExpr.t|ConstructorofConstructor.ttypet={kind:kind;elements:elementlist;}endmoduleObject:sigtypemethod_={name:string;type_:TypeExpr.t;}typefield=|Methodofmethod_|InheritofTypeExpr.ttypet={fields:fieldlist;open_:bool;}endmodulePackage:sigtypesubstitution=Fragment.Type.t*TypeExpr.ttypet={path:Path.ModuleType.t;substitutions:substitutionlist;}endtypelabel=|Labelofstring|Optionalofstringtypet=|Varofstring|Any|Aliasoft*string|Arrowoflabeloption*t*t|Tupleoftlist|ConstrofPath.Type.t*tlist|Polymorphic_variantofTypeExpr.Polymorphic_variant.t|ObjectofTypeExpr.Object.t|ClassofPath.ClassType.t*tlist|Polyofstringlist*t|PackageofTypeExpr.Package.tend=TypeExpr(** {3 Compilation units} *)modulerecCompilation_unit:sigmoduleImport:sigtypet=|Unresolvedofstring*Digest.toption|ResolvedofRoot.tendmoduleSource:sigtypet={file:string;build_dir:string;digest:Digest.t;}endmodulePacked:sigtypeitem={id:Identifier.Module.t;path:Path.Module.t;}typet=itemlistendtypecontent=|ModuleofSignature.t|PackofPacked.ttypet={id:Identifier.Module.t;doc:Comment.docs;digest:Digest.t;imports:Import.tlist;source:Source.toption;interface:bool;hidden:bool;content:content;expansion:Signature.toption;}end=Compilation_unitmodulerecPage:sigtypet={name:Identifier.Page.t;content:Comment.docs;digest:Digest.t;}end=Page