Browse thread
Another question about modules
[
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: | Ashish Agarwal <agarwal1975@g...> |
| Subject: | Re: [Caml-list] Another question about modules |
Firstly, you have a circular dependency. How are you compiling? That should
be the first error you get.
On Tue, Jul 15, 2008 at 6:51 PM, Andre Nathan <andre@digirati.com.br> wrote:
> I think this is similar to this simpler problem:
>
> a.ml:
>
> type t = { id: int }
> let f x = print_int x.id; B.f x
>
> a.mli:
>
> type t
> val f : t -> unit
>
> b.ml:
>
> let f x = print_int 42
>
> b.mli:
>
> val f : A.t -> unit
>
>
> Which results in "This expression has type t but is here used with type
> A.t" in a.ml, even though t and A.t are the same type. Is there a
> general solution for this kind of situation?
>
> Thanks,
> Andre
>
> _______________________________________________
> 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/caml-bugs
>