Browse thread
Void type?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Richard Jones <rich@a...> |
| Subject: | Re: [Caml-list] Re: Void type? |
On Mon, Jul 30, 2007 at 07:13:21PM -0400, Brian Hurt wrote:
> So how do I use that module and say, in the type system, "I will never
> pass in a b"? This is where the void type comes in. I can declare:
>
> module Myreq = struct
> type a = whatever;;
> type b = void;;
> end;;
>
> module Myexample = Example(Myreq);;
Similar to Markus Mottl's practical example. [I'm so glad that we're
getting practical uses out of this discussion ...]
The question is, which void type definition do you use?
type void
or
type void = { v: 'a. 'a }
It seems to me that your example could use either. Markus uses the
second definition, but I don't understand particularly why he couldn't
use either.
Rich.
--
Richard Jones
Red Hat