From: Matej Kosik <5764c029b688c1c0d24a2e97cd764f@gmail.com>
To: OCaml <caml-list@inria.fr>
Subject: [Caml-list] strange typechecking result
Date: Fri, 22 Feb 2013 17:50:15 +0000 [thread overview]
Message-ID: <5127AFD7.5040002@gmail.com> (raw)
Hello,
For one of my modules, the typechecker started to raise strange
complaints. I was not able to figure out exactly why, but at least I
wanted to narrow down the problem.
This small program:
type r1 = {l1 : unit list}
and r2 = {l2 : int64 list}
let rec f1 _ =
()
and _ r1 =
f1 r1.l1
and _ r2 =
f1 r2.l2
is rejected by the typechecker with a following error message:
File "test.ml", line 12, characters 5-10:
Error: This expression has type int64 list
but an expression was expected of type unit list
I do not understand why the given program was rejected.
Thanks in advance for any help.
--
Matej Kosik
next reply other threads:[~2013-02-22 17:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-22 17:50 Matej Kosik [this message]
2013-02-22 18:33 ` Leo White
2013-02-22 20:14 ` Matej Kosik
2013-02-22 21:06 ` Leo White
2013-02-22 23:09 ` Jeff Meister
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=5127AFD7.5040002@gmail.com \
--to=5764c029b688c1c0d24a2e97cd764f@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).