caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jeremy Yallop <yallop@gmail.com>
To: Dan Bensen <danbensen@att.net>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] trying to localize a functor/signature mismatch
Date: Tue, 10 Jul 2012 11:22:55 +0100	[thread overview]
Message-ID: <CAAxsn=F-aJxXnrTyV2Yv2B+sJXu+ukMUe3rkhg3QZ8jPYjs19Q@mail.gmail.com> (raw)
In-Reply-To: <1341912621.75991.YahooMailRC@web180013.mail.gq1.yahoo.com>

On 10 July 2012 10:30, Dan Bensen <danbensen@att.net> wrote:
> The compiler says an entire functor (all the contents of Make)
> is "not included" in a named signature (PST).  How can I
> localize the problem to some specific part(s) of the module?
>
> Here's the code: http://pastebin.com/mWgxMVNm
>
> And the compiler error message: http://pastebin.com/B0mAZhqw

This line:

   module Make (Reader: READER.T): PST = struct

says that Make is a functor that takes a READER.T and returns a PST.
You want to say instead that Make is a functor of type PST, so you
should change it to

   module Make : PST = functor (Reader: READER.T) -> struct

In other words, it's not that some component of the module doesn't
match the ascribed signature; the problem is that you're ascribing a
functor type to the result of your functor rather than to the functor
itself.

  reply	other threads:[~2012-07-10 10:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10  9:30 Dan Bensen
2012-07-10 10:22 ` Jeremy Yallop [this message]
2012-07-10 11:20   ` Dan Bensen

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='CAAxsn=F-aJxXnrTyV2Yv2B+sJXu+ukMUe3rkhg3QZ8jPYjs19Q@mail.gmail.com' \
    --to=yallop@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=danbensen@att.net \
    /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).