English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: [English only, sorry] O'Labl hands off the standard library?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1997-04-14 (13:42)
From: Jun P. Furuse <Jun.Furuse@i...>
Subject: Re: [English only, sorry] O'Labl hands off the standard library?
> Hi.  I'm quite intrigued by the polymorphic variant type system
> extension in O'Labl and I would like to try it; but I thoroughly
> dislike the other parts of O'Labl (labels and optionals).  Is there a
> way to apply just parts of the Ocaml -> O'Labl patch to get just the
> polymorphic variants and nothing else?  I realize that nothing forces
> me to actually _use_ labels and optionals, except --- the standard
> library gets labelized!  So, I'd be willing to have the entire compiler
> patch applied, if only the library is left alone.  Please?

O'Labl without labels ... It is no longer O'Labl ... Anyway, use olabl
or olablc with the -nolabels command line option. With this option,
you do not need to put labels. 

	% olabl -nolabels

	# let x = String.sub;;
	val x : string -> pos:int -> len:int -> string = <fun>

	# x "aiu" pos: 0 len: 1;;
	- : string = "a"

	# x "aiu" 0 1;;
	- : string = "a"

	# x we: "aiu" are: 0 ignored: 1;;
	- : string = "a"
Still the types are with labels , but O'Labl ignores them. Of course,
you lose the free order applications and the optional arguments.

Jun P. Furuse 					 Jun.Furuse@inria.fr
    Institut National de Recherche en Informatique et en Automatique