> The printing of Big_int is possible and AFAIK Big_int is an abstract
> data type.
> let print_big_int (value_big_int:Big_int.big_int) =
>Format.printf "%s" (Big_int.string_of_big_int value_big_int);;
I see, thanks. If I interpret this correctly, then the same code is
loaded twice. Once in
Hi,
I'm using the structural subtyping aspects of Ocaml's object system to emulate
width
subtyping. I've come across a problem which does not type-check, though
intuitively
it seems correct. I reckon that the compiler may need some help in the form of
type
annotations and/or coercions, though
Hi, the following seems to do the trick (?) :
Le 28 mars 10 à 18:38, Dario Teixeira a écrit :
let rec step1 ?story () = match story with
| Some s -> step2 s#title
| None -> step2 "title1"
and step2 title =
let story =
object
m
On Mar 28, 2010, at 18.38 h, Dario Teixeira wrote:
Hi,
I'm using the structural subtyping aspects of Ocaml's object system
to emulate width
subtyping. I've come across a problem which does not type-check,
though intuitively
it seems correct. I reckon that the compiler may need some help
Dario Teixeira a écrit :
> A simple nonsensical example that illustrates the problem is listed below; the
> type-checking error occurs in function "step1", where the optional parameter
> "story"
> is used as an object of type "< title:string; .. >". In function "step3",
> this
> parameter "story
Hi,
On Sun, 28 Mar 2010 19:32:37 +0200, Stéphane Glondu wrote:
>
> type steps = {
> step1 : 'a. ?story:( as 'a) -> unit -> bool;
> step2 : string -> bool;
> step3 : 'a. story:( as 'a) -> bool
> }
>
> let rec steps = { [...]
IMHO, recursive modules are also a nice way to achieve the same
On Sun, Mar 28, 2010 at 2:24 PM, Stefan Ratschan
wrote:
>> The printing of Big_int is possible and AFAIK Big_int is an abstract
>> data type.
>
>> let print_big_int (value_big_int:Big_int.big_int) =
>> Format.printf "%s" (Big_int.string_of_big_int value_big_int);;
>
> I see, thanks. If I interp
Hi,
> I'm using the structural subtyping aspects of Ocaml's object system to
> emulate width
> subtyping. I've come across a problem which does not type-check, though
> intuitively
> it seems correct. I reckon that the compiler may need some help in the form
> of type
> annotations and/or coe
CALL FOR PAPERS
APLAS 2010
Eighth Asian Symposium on Programming Languages and Systems
Shanghai, China
November 28-December 1, 2010
http://basics.sjtu.edu.cn/conference/aplas2010/