Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Some questions about signatures
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-04-15 (15:47)
From: Juan Jose Garcia Ripoll <jjgarcia@i...>
Subject: Some questions about signatures

I must admit that I'm more fluent in SML than in OCaml and that's the reason
for these questions.

1) Are OCaml's signatures opaque? I mean if they do hide the real
implementation of data types and of non-declared values to the public, much
like SML's :>

2) How can I extend a signature with new values and types? I've been using the
'include' directive, but I did not find it in the manual. Is this supposed to
work or is it just a Caml-Light reminiscent.

3) What is the simplest way to build toplevel modules using functors? In SML
everything on every file is bound to the toplevel environment and one can do
just 'structure NewStruct = AFunctor(structure A = AParameter)' to get a brand
new module. But in OCaml toplevel modules are defined in term of two files
(mli/ml) so what are my options if I dont want to add a spurious path name?


Juan Jose Garcia Ripoll		www:
Dpto. de Matematicas		job:
E.T.S.I. Industriales		home:
Univ. de Castilla-La Mancha, Ciudad Real E-13071 (Spain)