Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Cygwin ocaml crashes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Mark Wotton hons2001 <mrak@c...>
Subject: Re: [Caml-list] Subtypes in Ocaml
On Wed, 25 Apr 2001, Mark Wotton hons2001 wrote:

> How do you do subtypes in Ocaml? I'm writing a parser in which I want
> literals to be treated as expressions, but I also want to be able to treat
> them as literals in other contexts; ie, I need to be able to ensure that
> I'm being passed a literal at one point (for case statements), but I don't
> want to have to treat literals specially when they're being used somewhere
> in which a normal expression is allowable.
> 
> This may be a stupid question, but I can't find an answer I can understand
> in the docs.

Patternmatching seems to do it. if this isn't the right way to do it,
please, someone let me know before i do something stupid.

mrak


-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr