Re: [Caml-list] GADT constructor syntax

2010-12-05 Thread Jacques Garrigue
can come to understand that an explicit return type overrides this. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http

Re: [Caml-list] lablgtk pango_parse_markup

2010-11-29 Thread Jacques Garrigue
#add ~markup:span foreground=\red\Hello/span () Jacques Garrigue On 2010/11/29, at 22:20, Daniel de Rauglaudre wrote: Hi, I'd like to have a label widget in Lablgtk with a string with internationalization, bold, italic, utf8, color, things like that. I am not sure, but I saw in the Web

Re: [Caml-list] Desktop GUI toolkits - current state of the art?

2010-11-23 Thread Jacques Garrigue
). The obvious alternative to lablgtk2 is of course labltk. I personally think that labltk is still the easiest way to build a GUI, but many do not like Tk's lookfeel. I'm not aware of other GUI toolkits for ocaml, but I think there are also web-based UIs. Jacques Garrigue On Tue, Nov 23, 2010

Re: [Caml-list] Option functions (or lack thereof) + operator for composition

2010-11-16 Thread Jacques Garrigue
( @@ ) : ('a - 'b) - 'a - 'b = fun # succ @@ succ @@ succ 3;; - : int = 6 Note however that there is a simpler way to circumvent the problem: use the -w s option on the command line, disabling the statement warning. All my lablgtk code uses this flag :-) Jacques Garrigue

Re: [Caml-list] Merging object signatures

2010-11-05 Thread Jacques Garrigue
that this is rather verbose. I thought a few times of adding the syntax you propose, but was always stopped by the fact you can already do it in a verbose way. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman

Re: [Caml-list] Re: Generalized Algebraic Datatypes

2010-10-29 Thread Jacques Garrigue
of existential variables to be explicit. I.e. one could write App of 'a. ('a - 'b) t * 'a t : 'b t Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr

Re: [Caml-list] When can we ignore CAMLparam and CAMLreturn?

2010-10-25 Thread Jacques Garrigue
of corruption. When in doubt, it is always safer to use CAMLparam/CAMLreturn, eventhough they will generate a bit more code. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list

Re: [Caml-list] Type constraint to explain that a polymorphic variants is included into another

2010-10-08 Thread Jacques Garrigue
On 2010/10/09, at 2:13, Sylvain Le Gall wrote: Hello all, I would like to build an interface for plugins that allow to extract at the same time a very specific data for a plugin family and to extract general help for plugins. Here is an example: [...] This code doesn't compile because

RE: [Caml-list] LablGTK for ocaml 3.12

2010-10-01 Thread Jacques Garrigue
You were looking in the wrong place. The official lablgtk distribution is at wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html Since 2.14.2 as just been released, and there has been no change in the trunk since then, the daily snapshots are also ok. Jacques - From: Jianzhou Zhao

Re: [Caml-list] Optional arguments between non-optional ones

2010-09-23 Thread Jacques Garrigue
-expansion approach might introduce a discrepancy, you will get a type error. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list

Re: [Caml-list] difference of [ `A of int] and [ `A of int] ?

2010-09-21 Thread Jacques Garrigue
, the error message is not very explicit about the cause. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http

RE: [Caml-list] LablGtk 2.14.2

2010-09-17 Thread Jacques Garrigue
Thanks for the report. This is fixed now. Jacques Garrigue - From: JérémieDimino jere...@dimino.org The link to download the tarball seems to be broken: it ends with lablgtk-2.14.2.gz instead of lablgtk-2.14.2.tar.gz On Fri, Sep 17, 2010 at 05:59:19PM +0900, Jacques Garrigue wrote: Dear

Re: [Caml-list] functor substitution gives error

2010-09-07 Thread Jacques Garrigue
to write: module Unit = struct end module C(FreshGram : functor(Unit : sig end) - Camlp4Syntax) : Camlp4Syntax = Printers_Ocaml_Make(FreshGram(Unit)) Hope this helps. Jacques Garrigue As the names suggest the problem came up with in some Camlp4 code. Here is a striped down version

Re: [Caml-list] functor substitution gives error

2010-09-07 Thread Jacques Garrigue
, but not Hendrik's, because his example requires applicative functor to start with. Jacques Garrigue [Your 2 other versions] module A : sig type m module M : sig type t = m end end = struct module S = String module M = struct module Smap = Map.Make(S) type t = int

Re: [Caml-list] Bug in the module system of version 3.12.0+beta1

2010-07-22 Thread Jacques Garrigue
into a function returning a signature. Hope this helps, Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com

Re: [Caml-list] Bug in the module system of version 3.12.0+beta1

2010-07-22 Thread Jacques Garrigue
On 2010/07/22, at 18:37, rossb...@mpi-sws.org wrote: Jacques Garrigue garri...@math.nagoya-u.ac.jp wrote: module type MyModuleType(Param:ParamType) = sig ... end But this just doesn't make sense. Hm, I would disagree. It makes perfect sense, it just wouldn't desugar in the way Dumitru

Re: [Caml-list] Converting variants with only constant constructors to integers

2010-06-08 Thread Jacques Garrigue
representations... Jacques Garrigue On Tue, Jun 8, 2010 at 8:40 PM, bluestorm bluestorm.d...@gmail.com wrote: You're right : that's true in the int case and I hadn't considered it. But if you use the same trick for ('a - float) or other types you can get a segfault : # external floatify

Re: [Caml-list] Converting variants with only constant constructors to integers

2010-06-08 Thread Jacques Garrigue
From: Kaustuv Chaudhuri kaustuv.chaudh...@inria.fr On Tue, Jun 8, 2010 at 4:37 PM, Jacques Garrigue garri...@math.nagoya-u.ac.jp wrote: Of course intify can cause a segmentation fault! # let arr = Array.of_list [intify 1.0; 0];; Segmentation fault This may be splitting hairs

Re: [Caml-list] Annotated trees

2010-06-07 Thread Jacques Garrigue
with the other aproach, so I'm not sure that it matters that much. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http

Re: [Caml-list] Questions concerning modules as first-class values

2010-06-03 Thread Jacques Garrigue
natural.) Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http

Re: [Caml-list] new emacs tuareg mode release

2010-05-26 Thread Jacques Garrigue
that tuareg mode switch to the ocaml-mode code base, because I think that actually the tuareg code is cleaner. However, for various historical reasons the two code bases are developped in parallel, with some reasonable amount of sharing, so I see no real problem with the current situation. Jacques

Re: [Caml-list] Problem with recursive class and non-class types

2010-05-20 Thread Jacques Garrigue
bar = object val mutable foo : foo list end end = M class bar : M.bar = object val mutable foo : M.foo list = [] end You still need to provide an explicit interface for bar. Hope this helps, Jacques Garrigue ___ Caml-list mailing list. Subscription

[Caml-list] [Lablgtk] LablGtk 2.14.1

2010-05-20 Thread Jacques Garrigue
The windows release has not been updated at this time. --- Jacques Garrigue Nagoya University garrigue at math.nagoya-u.ac.jp A HREF=http://www.math.nagoya-u.ac.jp/~garrigue/JG

Re: [Caml-list] Closed variants, type constraints and module signature

2010-05-17 Thread Jacques Garrigue
the outside, while abbreviations just have to be expanded. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group

Re: [Caml-list] Binding and evaluation order in module/type/value languages

2010-05-17 Thread Jacques Garrigue
= r tf let r2 = r tf let r3 = r ts let test12 = assert (r1 = r2) (* fail = r1 ≠ r2 *) let test13 = assert (r1 = r3) (* fail = r1 ≠ r3 *) (* Conclusion: RHS evaluated exactly at the point of mapping application *) Sure, this is an eager language. Jacques Garrigue

Re: [Caml-list] Closed variants, type constraints and module signature

2010-05-14 Thread Jacques Garrigue
as the implementation. In your case, you should simply write type t = [`a | `b] since you don't know what v may be. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http

Re: [Caml-list] Closed variants, type constraints and module signature

2010-05-14 Thread Jacques Garrigue
From: Philippe Veber philippe.ve...@googlemail.com 2010/5/14 Jacques Garrigue garri...@math.nagoya-u.ac.jp From: Philippe Veber philippe.ve...@googlemail.com I'd like to define a type with a variable that is constrained to accept only polymorphic variant types included in a given set

Re: [Caml-list] Module type of a structure returned by functor

2010-04-26 Thread Jacques Garrigue
itself *) module type EdgeX' = module type of EdgeX module Algorithm(EdgeX : EdgeX) = struct let doit = EdgeX.foo end Hope this helps, Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml

Re: [Caml-list] Functions over polymorphic variants

2010-03-23 Thread Jacques Garrigue
such differential types, poinder the problem: what is the type of transform composed with itself. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr

Re: [Caml-list] range of hash function

2010-02-20 Thread Jacques Garrigue
is 243, so that names of no more than 4 characters are guaranteed to be different. You still have collisions, but they are going to be less similar. Both hash functions are defined in byterun/hash.c. Hope this helps, Jacques Garrigue ___ Caml-list

Re: [Caml-list] Preventing values from escaping a context

2010-02-09 Thread Jacques Garrigue
from uniqueness types. Cheers, Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug

Re: [Caml-list] Preventing values from escaping a context

2010-02-08 Thread Jacques Garrigue
!r () The language is just too expressive... You should rather look into adding a dynamic flag to your context, causing a runtime error if you use it later. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi

Re: [Caml-list] Error: In the definition of t, type ('a, 'b) t should be ('b, 'a) t

2010-01-05 Thread Jacques Garrigue
to unroll it by hand: type ('a, 'b) t = [ `A of 'a | `T of [ `A of 'b | `T of ('a,'b) t]];; (I added an argument to `A to make the parameters meaningful.) Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin

Re: [Caml-list] revised syntax for abstract types ?

2009-12-10 Thread Jacques Garrigue
(IntList.Cons (1, IntList.Nil));; Again, these two definitions of list, while representing the same data, are incompatible. Hope this helps. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman

[Caml-list] LablGtk 2.14.0

2009-09-25 Thread Jacques Garrigue
. --- Jacques Garrigue Nagoya University garrigue at math.nagoya-u.ac.jp A HREF=http://www.math.nagoya-u.ac.jp/~garrigue/JG/A ___ Caml-list mailing list. Subscription

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Jacques Garrigue
First, like everybody else, I'd like very much to try this out. Is there any chance it could compile on Snow Leopard :-) (I suppose it's near impossible, but still ask...) From: Jon Harrop j...@ffconsultancy.com Visual Basic has been a *lot* faster than OCaml for several years now, not least

Re: [Caml-list] polymorphic method.

2009-09-11 Thread Jacques Garrigue
to types in camlp4. Implementing it requires lots of changes to the type inference itself. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr

Re: [Caml-list] polymorphic method.

2009-09-10 Thread Jacques Garrigue
inference, and suddenly break your program. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group

Re: [Caml-list] ocamlgraph predecessors

2009-08-09 Thread Jacques Garrigue
doubly linked lists has only a very limited cost, mostly related to the extra space needed. By the way, BSD uses lots of singly-linked lists, probably because it comes from a time when there was not so much memory. Jacques Garrigue ___ Caml-list mailing

Re: [Caml-list] annotations and type-checking

2009-07-29 Thread Jacques Garrigue
). Jacques Garrigue On Wed, Jul 29, 2009 at 3:40 AM, Mark Shinwellmshinw...@janestcapital.com wrote: On Tue, Jul 28, 2009 at 05:47:25PM -0400, Aaron Bohannon wrote: Why do the first two programs type-check but the thrid one does not? Dark corners of the type system. let f (x : 'a) : 'a = x in (f

Re: [Caml-list] Width subtyping

2009-05-31 Thread Jacques Garrigue
. But whether it matters or not depends much on what you use them for in your program. Jacques Garrigue (* To compile: ocamlc -I +camlp4 -c -pp camlp4orf pa_polymap.ml ocamlc -c polymap.ml To use: ocaml dynlink.cma camlp4o.cma pa_polymap.cmo polymap.cmo or ocamlc -pp

Re: [Caml-list] let x = ... in object ...

2009-05-26 Thread Jacques Garrigue
is the size taken by y. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug

Re: [Caml-list] Static Function in Class

2009-05-17 Thread Jacques Garrigue
) = object val x = n method get_x = x method print = print_int x end let create = new test let equal t1 t2 = t1#get_x = t2#get_x end Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin

Re: [Caml-list] mixed functional / object style

2009-04-19 Thread Jacques Garrigue
. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin

Re: [Caml-list] Typing of polymorphic variants

2009-04-16 Thread Jacques Garrigue
the definitions are mutually recursive, and do not go through any datatype definition. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list

Re: [Caml-list] pattern matching and records vs tuples

2009-04-16 Thread Jacques Garrigue
://www.pllab.riec.tohoku.ac.jp/smlsharp/ # fun f x = #name x; val f = fn : ['a, 'b#{name:'a}. 'b - 'a] # f {name = Joe, age = 21}; val it = Joe : string But the compiler is rather clever... Jacques Garrigue ___ Caml-list mailing list. Subscription management

Re: [Caml-list] class type param constraint

2009-04-09 Thread Jacques Garrigue
From: Radzevich Belevich radzevich.belev...@gmail.com class [ 'c ] a = object(self) constraint 'c = .. method as_c = (self : 'c) method id = Oo.id self end ;; class ['a] a : object ('a) constraint 'a = as_c : 'a; id : int; ..

Re: [Caml-list] Subtyping

2009-04-07 Thread Jacques Garrigue
(fun w - w.base {bop = fun r - r.fn r.x}) l As you can see, the result is rather verbose, but this works. Fortunately, closure and objects are usually enough... Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr

Re: [Caml-list] Subtyping

2009-04-07 Thread Jacques Garrigue
universality is checked, to ensure that no cross application can be done. Jacques Garrigue Then what you are asking for is existential types. There is no syntax for them in ocaml, but they can be encoded through universal types (interestingly, the dual is not true). type 'a base = {x : 'a; fn

Re: [Caml-list] A small question on polymorphic variants

2009-04-05 Thread Jacques Garrigue
/'a] represents substitution. In other words, b has one more constructor than a. Is a always a subtype of b? Yes, but only if 'a appears only in covariant positions inside t1...tn. And you will need double coercions (i.e. coercions with explicit source and target types) to enforce this subtyping. Jacques

Re: [Caml-list] Instance variables can't be polymorphic?

2009-04-05 Thread Jacques Garrigue
, but then you can't access it after inheritance), or to use a private method. What is your problem with a private method? It should be more flexible. Of course you can also define a record to wrap your polymorphic value. Jacques Garrigue ___ Caml-list

Re: [Caml-list] Bug? Constraints get ignored in methods

2009-04-05 Thread Jacques Garrigue
to use the second without the first. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group

Re: [Caml-list] Execution order in class construction

2009-04-05 Thread Jacques Garrigue
order, and I don't see why it should change, but if your code depends on such things it may always be a good idea to put somewhere a bit of code that verifies that the behaviour is correct. Jacques Garrigue ___ Caml-list mailing list. Subscription

Re: [Caml-list] Private types in 3.11, again

2009-01-21 Thread Jacques Garrigue
of the problem you reported in your previous mail. There is however a real type error, because Node.t, as it has a private row, cannot be an instance of the fixed type elem_t. Cheers, Jacques Garrigue ___ Caml-list mailing list. Subscription management

Re: [Caml-list] Private types in 3.11, again

2009-01-21 Thread Jacques Garrigue
From: Dario Teixeira darioteixe...@yahoo.com I ditched the regular variants in favour of polymorphic variants, hoping the coercion trick described by Jacques Garrigue would help [1]. I've also simplified the formulation as much as possible. Anyway, I'm still stuck with the same problem

Re: [Caml-list] Private types in 3.11, again

2009-01-21 Thread Jacques Garrigue
hope this gives you some ideas on how to proceed. Cheers, Jacques Garrigue module Node: sig type +'a t = private | Text of string | Bold of 'a t list | Href of string | Mref of string * [`Nonlink] t list val text: string - [ `Nonlink ] t val bold: 'a t list - 'a t val

Re: [Caml-list] Private types in 3.11, again

2009-01-21 Thread Jacques Garrigue
both `Link and `Nonlink in input. This would not be necessary if I had written Mref of string * 'a t list in the definition, rather than Mref of string * [`Nonlink] t list like I did. But being more specific also means that you have more information when you unwrap an Mref node. Cheers, Jacques

Re: [Caml-list] What is a future of ocaml?

2009-01-15 Thread Jacques Garrigue
classes for polymorphic variants, without introducing conflicts. I'm afraid the combination of type classes with modules and functors is not trivial either. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin

Re: [Caml-list] Debugging the compiler

2009-01-03 Thread Jacques GARRIGUE
From: Jacques Carette care...@mcmaster.ca Subject: [Caml-list] Debugging the compiler Date: Sat, 27 Dec 2008 10:24:52 -0500 Nothing like the holidays for a little playing around with some ideas by modifying a compiler... Having got the hang of bootstrapping the compiler [with help from old

Re: [Caml-list] Private types

2008-10-30 Thread Jacques Garrigue
everywhere subtyping is needed. You can also compare that to the situation between int and float. For most uses, int can be viewed as a subtype of float. However ocaml separates the two, and requires coercion functions whenever you want to use an int as a float. Cheers, Jacques Garrigue

Re: [Caml-list] What does Jane Street use/want for an IDE? What about you?

2008-10-25 Thread Jacques Garrigue
Using labels makes this kind of code more readable. open StdLabels let x = List.map my_list ~f: begin fun z - very_blabla end in ... Jacques Garrigue From: DooMeeR [EMAIL PROTECTED] Another possibility is: let x = List.map begin fun z - very_blabla end my_list

[Caml-list] Re: A bug(?) around phantoms in 3.11.0 b1

2008-10-21 Thread Jacques Garrigue
Hi Jun, If it's a bug, it should go to mantis... but it's not one. From: Jun Furuse [EMAIL PROTECTED] I found a strange bug in 3.11.0 beta 1. The following typical example of phantom types does not compile any more. (It is compilable in 3.10.2, but not in release311): module M : sig

Re: [Caml-list] ocaml 3.11 and lablgtk2

2008-10-17 Thread Jacques Garrigue
lablgtk programs under FreeBSD is very slow (1mn). I know how to fix it in the ocaml compiler, but this rather looks like a FreeBSD bug. Cheers, Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman

Re: [Caml-list] Ocaml type with constraints?

2008-09-21 Thread Jacques Garrigue
invalid_arg Item.create end # Item.create 3 9.95;; - : Item.item = Item.Item (3, 9.95) # Item.create 3 (-1.0);; Exception: Invalid_argument Item.create. Note that you must imperatively use Item.create to create an item, but you can use pattern-matching as usual to access its contents. Jacques

Re: [Caml-list] typeclasses in OCaml

2008-08-22 Thread Jacques Garrigue
using #fold and cons: let map cons f (o : 'a #foldable) = o#fold (fun x o' - cons (f x) o') Note that for this to work you need #fold to be the correct fold (i.e. fold_right) Hope this helps, Jacques Garrigue ___ Caml-list mailing list. Subscription

Re: [Caml-list] Not a variant??

2008-08-21 Thread Jacques Garrigue
From: Jacques Carette [EMAIL PROTECTED] Jacques Garrigue wrote: The message is maybe not clear enough: for pattern-matching and inheritance, you need an exact variant type, i.e. a type whose lower and upper bounds are identical. Indeed - I would suggest that the error include some clearer

Re: [Caml-list] Not a variant??

2008-08-19 Thread Jacques Garrigue
, you need an exact variant type, i.e. a type whose lower and upper bounds are identical. This is clearly not the case for c. The standard workaround is to write: type c0 = [a | b] type 'a c = 'a constraint 'a = [ c0] Jacques Garrigue ___ Caml-list

Re: [Caml-list] Troublesome nodes

2008-07-18 Thread Jacques Garrigue
expansions are cached, but this needs more investigating. Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group

Re: [Caml-list] Troublesome nodes

2008-07-18 Thread Jacques Garrigue
:-) Cheers, Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http

Re: [Caml-list] Troublesome nodes

2008-07-17 Thread Jacques Garrigue
(with of course a different semantics). If you need the private row semantics, you should now write it as type (+a, 'b) t = private [ super_node_t] as 'a which is more intuitive anyway. Jacques Garrigue ___ Caml-list mailing list. Subscription management

Re: [Caml-list] Troublesome nodes

2008-07-17 Thread Jacques Garrigue
From: Jeremy Yallop [EMAIL PROTECTED] Jacques Garrigue wrote: From: Jeremy Yallop [EMAIL PROTECTED] Dario Teixeira wrote: type ('a, 'b) t = private 'a constraint 'a = [ super_node_t ] I don't think this is quite what you want yet, although it's getting close! The first problem

Re: [Caml-list] Polymorphic variant as a witness?

2008-06-27 Thread Jacques Garrigue
. Functors would be syntactically nicer, but they wouldn't let you infer the type of w, which is the whole point. If getting data out of tuples proves to be a pain, you could also return an immediate object. Cheers, Jacques Garrigue ___ Caml-list mailing list

Re: [Caml-list] Problem with class method and polymorphic variants

2008-06-25 Thread Jacques Garrigue
relevant (but only when there is a bug!) Jacques Garrigue ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group

Re: [Caml-list] Problem with class method and polymorphic variants

2008-06-24 Thread Jacques Garrigue
by giving explicitly a module signature (this is what ocamlc does internally). This is now fixed in CVS, branch release310. Note that you may still have other kinds of problems using upper-bounded polymorpic variants inside constraints. Just report them as you go... Cheers, Jacques Garrigue

Re: [Caml-list] ocamlc freezes

2008-05-12 Thread Jacques Garrigue
a method's type with method override. So get_right_sibling in typ has still type [node option], which means that in foo_typ, ['p foo_typ] should be a [node option], hence the contradiction. There was a type-checker bug in 3.09.2, but it is now fixed. Cheers, Jacques Garrigue