Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2001-04-25 (05:45)
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.


To unsubscribe, mail  Archives: