module OwnMap:This module provides an not polymorphic map implementation. It is based on the Map module of the OCaml standard library. The main difference is, that thesig
..end
Make
functor takes two
arguments, one that represents the domain of the map,
and the other that represents the image of the map.
As result you get an map that is not polymorphic in
the image. This allows you to restrict the possible values
that are allowed in the map and possibly as a result of
this you might get better error reports from OCaml. Of cause
you lost the flexibility to use one module at different places
with different images.
An other advantage is, that you can add string_of
functions
to the module, if you needs them. AddString
allows to specify
the mapto
string and the seperator
string, AddS
is a simple
version of the functor that uses ","
and "->"
for these two
strings.
Author(s): : Phillip Heidegger
module type OrderedType =sig
..end
module type StringOf =sig
..end
module type Custom =sig
..end
module type S =sig
..end
Map.S
signature (from the
OCaml standard library).
module type S_Str =sig
..end
module Make:
module AddString:
module AddS:
string_of
function to a map using
the default separator
"," and the mapsto
default "->"