[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Jacques Garrigue <garrigue@k...> |
| Subject: | Re: [Caml-list] Parametric classes and weak types |
Hi,
> Using ocaml 3.04 under solaris or linux, using the ocaml I have the
> following problem:
> # let ca1 = new ca ;;
> val ca1 : ('a -> '_b) ca as 'a = <obj>
> # let cb1 = new cb ;;
> val cb1 : ('a -> '_b, 'c ca -> '_d as 'c) cb as 'a = <obj>
> # cb1#set_atts [ca1];;
> - : unit = ()
> # cb1#set_transform (fun x -> x) (fun x -> x);;
> - : unit = ()
> # cb1#transform ;;
> - : (('a -> 'a, ('b ca as 'c) -> 'c as 'b) cb as 'a) * 'c list =
> <obj>, [<obj>]
> # cb1#transform ;;
>
> Here it hangs indefinitely.
I'm working on the problem. Curiously, what triggers it seems to be
the printer: as long as values of the above type are not printed, type
inference works fine.
It's touching a very sensitive part of ocaml, the combination of
recursive types and type abbreviations. Maybe Jerome can also have a
look at the bug report ? Hint: the loop is in a call to expand_head,
inside moregeneral.
Jacques Garrigue
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr