caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] trying to localize a functor/signature mismatch
@ 2012-07-10  9:30 Dan Bensen
  2012-07-10 10:22 ` Jeremy Yallop
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Bensen @ 2012-07-10  9:30 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 671 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] trying to localize a functor/signature mismatch
  2012-07-10  9:30 [Caml-list] trying to localize a functor/signature mismatch Dan Bensen
@ 2012-07-10 10:22 ` Jeremy Yallop
  2012-07-10 11:20   ` Dan Bensen
  0 siblings, 1 reply; 3+ messages in thread
From: Jeremy Yallop @ 2012-07-10 10:22 UTC (permalink / raw)
  To: Dan Bensen; +Cc: caml-list

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] trying to localize a functor/signature mismatch
  2012-07-10 10:22 ` Jeremy Yallop
@ 2012-07-10 11:20   ` Dan Bensen
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Bensen @ 2012-07-10 11:20 UTC (permalink / raw)
  To: Jeremy Yallop; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 320 bytes --]

> 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

Yep, that's it.  Thanks a lot :)

[-- Attachment #2: Type: text/html, Size: 582 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-10 11:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-10  9:30 [Caml-list] trying to localize a functor/signature mismatch Dan Bensen
2012-07-10 10:22 ` Jeremy Yallop
2012-07-10 11:20   ` Dan Bensen

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).