Module OwnMap


module OwnMap: sig .. end
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 the 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
The ordered type, like in the original Map module
module type StringOf = sig .. end
The module signature for types that can be converted into strings.
module type Custom = sig .. end
Custom string print informations for the map modules
module type S = sig .. end
The signature for the map, very similar to the Map.S signature (from the OCaml standard library).
module type S_Str = sig .. end
The Signature of the map together with the string_of conversion function
module Make: 
functor (Key : OrderedType) ->
functor (Img : OrderedType) -> S with type key = Key.t and type img = Img.t
The module to create a map with a fixed image
module AddString: 
functor (KeyS : StringOf) ->
functor (ImgS : StringOf) ->
functor (SCustom : Custom) ->
functor (Map : S with type img = ImgS.t and type key = KeyS.t) -> S_Str with type key = Map.key and type img = Map.img
This functor adds string_of function to a map.
module AddS: 
functor (KeyS : StringOf) ->
functor (ImgS : StringOf) ->
functor (Map : S with type img = ImgS.t and type key = KeyS.t) -> S_Str with type key = Map.key and type img = Map.img
This functor adds string_of function to a map using the default separator "," and the mapsto default "->"