From: Marc Weber <marco-oweber@gmx.de>
To: caml-list <caml-list@inria.fr>
Subject: [Caml-list] Re: ocamlopt vs camlc, different behaviour - how to track down?
Date: Sat, 29 Jun 2013 01:54:50 +0200 [thread overview]
Message-ID: <1372463499-sup-1099@nixos> (raw)
In-Reply-To: <1372089559-sup-2177@nixos>
Error: The implementation m.ml does not match the interface m.cmi:
Values do not match:
val empty : ('_a, 'b) t
is not included in
val empty : ('a, 'b) t
File "m.ml", line 11, characters 4-9: Actual declaration
make: *** [m.cmo] Error 2
files as zip: http://mawercer.de/tmp/test-case.zip
contents:
makefile =========================
default: m.cmo
m.cmi: m.mli
ocamlc -o $@ -c $<
m.cmo: m.ml m.cmi
ocamlc -o $@ -c $<
m.ml ============================
type ('k, 'v) map =
| Empty
| Node of ('k, 'v) map * 'k * 'v * ('k, 'v) map * int
type ('k, 'v) t =
{
cmp : 'k -> 'k -> int;
map : ('k, 'v) map;
}
let empty =
let () = print_string "[\"pMap.ml\": 81:12-42 81:42]\n"
in { cmp = compare; map = Empty; };
m.mli ============================
type ('a, 'b) t
val empty : ('a, 'b) t
In cases like first, find_all I was able to workaround this compilation
error by adding explicit parameters, eg
find_all a b = find a b instead of find_all = find
However in the "empty" case I need more help. How to make this case
compile ?
Marc Weber
next prev parent reply other threads:[~2013-06-28 23:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 16:03 [Caml-list] " Marc Weber
2013-06-25 1:12 ` [Caml-list] " Marc Weber
2013-06-25 5:45 ` [Caml-list] " Stéphane Glondu
2013-06-28 23:54 ` Marc Weber [this message]
2013-06-29 7:31 ` [Caml-list] " Gabriel Scherer
2013-07-10 1:56 ` Marc Weber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1372463499-sup-1099@nixos \
--to=marco-oweber@gmx.de \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox