* Module Abbreviations in MLI Files
@ 2005-12-06 18:27 David McClain
2005-12-06 23:27 ` [Caml-list] " Jacques Garrigue
0 siblings, 1 reply; 2+ messages in thread
From: David McClain @ 2005-12-06 18:27 UTC (permalink / raw)
To: caml-list
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?
Cheers,
- David McClain
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] Module Abbreviations in MLI Files
2005-12-06 18:27 Module Abbreviations in MLI Files David McClain
@ 2005-12-06 23:27 ` Jacques Garrigue
0 siblings, 0 replies; 2+ messages in thread
From: Jacques Garrigue @ 2005-12-06 23:27 UTC (permalink / raw)
To: dmcclain1; +Cc: caml-list
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-12-06 23:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-06 18:27 Module Abbreviations in MLI Files David McClain
2005-12-06 23:27 ` [Caml-list] " Jacques Garrigue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox