From: Luca Pascali <pasckosky2000@yahoo.it>
To: caml-list@inria.fr
Subject: Re: [Caml-list] exception Failure and failwith
Date: Thu, 23 Jun 2005 10:04:30 +0200 [thread overview]
Message-ID: <42BA6D0E.5000800@yahoo.it> (raw)
In-Reply-To: <20050621185506.GA7604@force.stwing.upenn.edu>
William Lovas wrote:
>On Tue, Jun 21, 2005 at 01:34:40PM +0200, Luc Maranget wrote:
>
>
> [...]
>
>In fact, one could easily build such a "Core" module as a user, following
>Julien's advice:
>
>
>
It's what I did. I added to my project a module named core.
This module just has the redefinition of exceptions
>>>exception Prim_Failure = Failure
>>>
>>>to get rid of any further shadowing.
>>>
>>>
>
>Just take this to the next level with something like:
>
> module Core =
> struct
> exception Failure = Failure
> type 'a opt = 'a option = None | Some of 'a
> type 'a option = 'a opt
> (* ... *)
> end
>
>
[...]
>cheers,
>William
>
>
>
At the moment, in my module, I put only the exceptions, because they are
the most critical. (It's easier to use a name like Failure for an
exception or an enumeration, instead of redefining an option type).
Anyway if I will ever need to redefine built-in enumerations too, I will
use your method.
Bye
LP
--
*********************************************************************
Luca Pascali
luca@barettadeit.com
asxcaml-guru@barettadeit.com
http://www.barettadeit.com/
Baretta DE&IT
A division of Baretta SRL
tel. 02 370 111 55
fax. 02 370 111 54
Our technology:
http://www.asxcaml.org/
http://www.freerp.org/
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
next prev parent reply other threads:[~2005-06-23 8:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-21 8:34 Luca Pascali
2005-06-21 9:07 ` [Caml-list] " Luc Maranget
2005-06-21 11:15 ` Luca Pascali
2005-06-21 11:34 ` Luc Maranget
2005-06-21 18:23 ` sejourne_kevin
2005-06-21 18:55 ` William Lovas
2005-06-23 8:04 ` Luca Pascali [this message]
2005-06-21 9:30 ` Julien Signoles
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=42BA6D0E.5000800@yahoo.it \
--to=pasckosky2000@yahoo.it \
--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