Title: Theory / Unimportant / CS / Programming / oCaml / Manual{ / 02 Module;
Tags: hasNotNewEffectReturnsMeaning some_instruction fromMath mathToDef type FromInstruction computer_to_instruction

Name: A structure
Definition: A group of related type and values
Chapter: 2
Section: 1

Typ: M.t
Meaning: The type t of module M
Language: ocaml
Chapter: 2
Section: 1
Variables: M a module name with a type t

Name: A concrete type
Definition: A type whose implementation is known.
Chapter: 2
Variables: In module

Name: An abstract type
Definition: A type whose implementation is unknown.
Chapter: 2
Variables: In module

Extension: mli
Description: Describe interface of OCaml modules
Means: ocaML Interface
Other fields (not shown on cards):
Chapter: 2
Section: 5

Extension: cmi
Description: File obtained by compiling a .mli file. Or a .ml file if no mli exists.
Means: Compiled Interface
Other fields (not shown on cards):
Chapter: 2
Section: 5

Extension: cmo
Description: Compiled object bytecope obtained by compiling .ml file
Means: Compiled Object code
Other fields (not shown on cards):
Chapter: 2
Section: 5

Typ: sig
type typeName_1 (= explicitType_1)
...
type typeName_n (= explicitType_n)
val valName1: type'_1
...
val valNamen': type'_n'
_ exception exceptionName_1
...
_ exception exceptionName_n''
end
Meaning: The signature of a module with n types, n' values and n'' exception
Language: ocaml
Chapter: 2

Instruction: module
type typeName_1 = explicitType_1
...
type typeName_n = explicitType_n
let valName_1= code_1
...
let valName_n_'= code_n_'
exception exceptionName1
...
exception exceptionName_n_''
end
Effect: A module with n types typeName_i, n' values valName_n and n'' exception exceptionName_i
Language: ocaml
Chapter: 2
Section: 1

Instruction: M.v
Effect: Accessing the element v of M
Language: ocaml
Chapter: 2
Section: 1
Variables: M a module name with a value v

Typ: functor (varModule_1: typeModule_1, ..., varModule_n: typeModule_n)->
typeModuleOut with type typeOfOut = varModule_i.typeOfModule_i
Meaning: The signature of a functor sending n structures of type typeModule_1, ..., typeModule_n, to a structure of type typeModuleOut, where varModulei.t is interpreted as the t type of varModulei, and where typeOfOut occuring in typeModuleOut is equal to typeOfModule_i occuring in varModule_i
Language: ocaml
Chapter: 2
Section: 4