Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Some, None and the caml-C interface
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Yaron M. Minsky <yminsky@C...>
Subject: [Caml-list] Some, None and the caml-C interface
I've written some simple macros for accessing options in ocaml, and I
want to double check that they are actually right.  Does this look
right?  And is this documented anywhere?

#define Is_None(v)  (Is_long(v))
#define Is_Some(v)  (!Is_None(v))
#define Some_val(v) (Field(v,0))

Thanks,
Yaron

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners