From: Pascal Brisset <brisset@recherche.enac.fr>
To: caml-list@inria.fr
Subject: [Caml-list] renaming a type
Date: Thu, 13 Sep 2001 15:52:25 +0200 [thread overview]
Message-ID: <E15hWun-0008Kr-00@mauve.recherche.enac.fr> (raw)
I want to alias a type outside a module in order to use it easily
without opening the module.
For example
sepia[211]% ocaml
Objective Caml version 3.01
# module M = struct type t = T end;;
module M : sig type t = T end
# type t' = M.t = T;;
type t' = M.t = T
# T = M.T;;
- : bool = true
Unfortunately it does not work is I instantiate a polymorphic type with the
same idea:
# module M = struct type 'a t = T end;;
module M : sig type 'a t = T end
# type t' = int M.t = T;;
^^^^^^^^^^^^^^^^
The variant or record definition does not match that of type int M.t
Is there a workaround to get the expected result: writing, without prefixing
the module name, values of a type defined in a module and aliased outside ?
--Pascal
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
next reply other threads:[~2001-09-13 13:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-13 13:52 Pascal Brisset [this message]
2001-09-14 6:12 ` Francois Pottier
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=E15hWun-0008Kr-00@mauve.recherche.enac.fr \
--to=brisset@recherche.enac.fr \
--cc=caml-list@inria.fr \
/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