Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: dmcclain1@mindspring.com
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Module Abbreviations in MLI Files
Date: Wed, 07 Dec 2005 08:27:47 +0900 (JST)	[thread overview]
Message-ID: <20051207.082747.205306140.garrigue@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <00fd01c5fa92$ae4bf570$0201000a@dylan>

From: "David McClain" <dmcclain1@mindspring.com>

> I'm a bit rusty writing raw OCaml from scratch, and I ran into syntax errors
> this morning whenever I tried to use Module abbreviations, such as
> 
> module T = Types
> 
> in my MLI files. These work just fine in ML files.
> 
> What is the reason for preventing type abbreviations in the interface spec?

There is no such thing as "module abbreviations".
The above is a module definition: it defines a module T, with the same
contents as module Types.
A module is a value, and you cannot define values in a signature, only
declare them.
If you have a signature Types_sig for Types, you might write
  module T : Types_sig
but then you would have to include an implementation in the module.

Jacques


      reply	other threads:[~2005-12-06 23:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-06 18:27 David McClain
2005-12-06 23:27 ` Jacques Garrigue [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051207.082747.205306140.garrigue@math.nagoya-u.ac.jp \
    --to=garrigue@math.nagoya-u.ac.jp \
    --cc=caml-list@yquem.inria.fr \
    --cc=dmcclain1@mindspring.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox