Loading ...
Sorry, an error occurred while loading the content.

3283Re: "ocaml_beginners"::[] Modules

Expand Messages
  • jonboy3182
    May 1, 2005
    • 0 Attachment
      --- In ocaml_beginners@yahoogroups.com, Matt Gushee <mgushee@h...> wrote:
      > jonboy3182 wrote:
      > > How do I have multiple implementations of a module use one interface
      > > (without using Objects). For instance:
      > >
      > > Interface: Tree
      > > Implementations: BinaryTree, AvlTree, RedBlackTree, AATree
      > Well, a couple of others have given good answers, so I won't repeat
      > they said. You should know, however, that when you are using implicit
      > interfaces and implementations (i.e. the module is inferred from the
      > .ml/.mli file, rather than defined with the 'module' keyword), you
      > get to choose which is bound to which. I.e., if you had 'tree.mli' and
      > 'binarytree.ml', etc. You would have to copy 'binarytree.ml' to
      > 'tree.ml' in order to bind it to the 'tree.mli' interface. This is
      > unfortunate, but it seems that it would be difficult to allow
      > flexibility in matching .ml and .mli compilation units.
      > --
      > Matt Gushee
      > Englewood, CO, USA

      ml/mli files:
      That's what I was wondering about (sorry i left that important detail
      out...). I knew about the toplevel idea, but thanks.
    • Show all 17 messages in this topic