caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jonathan Roewen <jonathan.roewen@gmail.com>
To: caml-list@yquem.inria.fr
Subject: [Caml-list] enumerations & ioctls
Date: Thu, 30 Jun 2005 23:14:07 +1200	[thread overview]
Message-ID: <ad8cfe7e05063004144fa2b2ff@mail.gmail.com> (raw)

Hi,

I'm about to endeavour into designing a driver interface for my OS
project, and I have some questions about making a type-safe ioctl-like
function.

Since different device types have different sets of ioctl calls it can
accept, I need to be able to have a structure that I can put different
devices into, implying the enumerations aren't identical.

Is the best way to achieve this with those polymorphic variants? And
how much does this affect type safety?

Jon


             reply	other threads:[~2005-06-30 11:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-30 11:14 Jonathan Roewen [this message]
2005-06-30 13:06 ` Richard Jones
2005-07-01  3:18   ` Jonathan Roewen

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=ad8cfe7e05063004144fa2b2ff@mail.gmail.com \
    --to=jonathan.roewen@gmail.com \
    --cc=caml-list@yquem.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;
as well as URLs for NNTP newsgroup(s).