caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Fully qualified polymorphic variants
@ 2001-07-11 10:18 Sami Nopanen
  2001-07-11 10:22 ` Jacques Garrigue
  2001-07-11 10:25 ` Markus Mottl
  0 siblings, 2 replies; 3+ messages in thread
From: Sami Nopanen @ 2001-07-11 10:18 UTC (permalink / raw)
  To: caml-list

I've been trying to use polymorphic variants with fully qualified names, with no luck.

I've tried the possibilities obvious to me, like: (example of using Pcre)
  `Pcre.CASELESS
  Pcre.`CASELESS
  `(Pcre.CASELESS)
  Pcre.(`CASELESS)

None of them seemed to work. Is there a way to do this, and if so, what would be the
corrert syntax.

Cheers,

Sami Nopanen, snopanen@cc.hut.fi
-------------------
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Fully qualified polymorphic variants
  2001-07-11 10:18 [Caml-list] Fully qualified polymorphic variants Sami Nopanen
@ 2001-07-11 10:22 ` Jacques Garrigue
  2001-07-11 10:25 ` Markus Mottl
  1 sibling, 0 replies; 3+ messages in thread
From: Jacques Garrigue @ 2001-07-11 10:22 UTC (permalink / raw)
  To: sam; +Cc: caml-list

> I've been trying to use polymorphic variants with fully qualified names, with no luck.
> 
> I've tried the possibilities obvious to me, like: (example of using Pcre)
>   `Pcre.CASELESS
>   Pcre.`CASELESS
>   `(Pcre.CASELESS)
>   Pcre.(`CASELESS)

The point about polymorphic variants is that you don't have to qualify
them!

The solution is `CASELESS, independent of the context.

Jacques Garrigue
-------------------
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Fully qualified polymorphic variants
  2001-07-11 10:18 [Caml-list] Fully qualified polymorphic variants Sami Nopanen
  2001-07-11 10:22 ` Jacques Garrigue
@ 2001-07-11 10:25 ` Markus Mottl
  1 sibling, 0 replies; 3+ messages in thread
From: Markus Mottl @ 2001-07-11 10:25 UTC (permalink / raw)
  To: Sami Nopanen; +Cc: caml-list

On Wed, 11 Jul 2001, Sami Nopanen wrote:
> I've been trying to use polymorphic variants with fully qualified names,
> with no luck.

Simple answer: you don't need fully qualified names! That's the idea
behind polymorphic variants that they have the same representation no
matter where they are used. They need not (cannot) be defined in a type
definition, which also means that you need not (cannot) refer to them
via module paths.

Regards,
Markus Mottl

-- 
Markus Mottl                                             markus@oefai.at
Austrian Research Institute
for Artificial Intelligence                  http://www.oefai.at/~markus
-------------------
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-07-11 10:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-11 10:18 [Caml-list] Fully qualified polymorphic variants Sami Nopanen
2001-07-11 10:22 ` Jacques Garrigue
2001-07-11 10:25 ` Markus Mottl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).