Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Hendrik Tews <tews@irritatie.cs.kun.nl>
To: caml-list@inria.fr
Subject: Re: Problem binding type parameters in modules
Date: Tue, 19 Jan 1999 09:50:03 +0100	[thread overview]
Message-ID: <199901190850.JAA12869@irritatie.cs.kun.nl> (raw)
In-Reply-To: <199901161221.NAA00134@miss.wu-wien.ac.at>

Hi,
   
   My problem (example code):
   
   [omitted]

What about using abstraction? eg

    module type FOO1 =
    sig
      type 'a foo
      val empty : unit -> 'a foo
    end

    module Bar : FOO1 =
    struct
      type 'a foo = 'a list Lazy.t
      let empty () = lazy []
    end

Then empty is a function and its type gets generelized.

   The "'a" specified in "empty" is still not the same as in "'a foo". I have

The section about type checking in the list of "Frequently asked
Questions about Caml"
(http://caml.inria.fr/FAQ/FAQ_EXPERT-eng.html) explains the
differences between 'a and '_a.


Bye,

Hendrik




      parent reply	other threads:[~1999-01-19 16:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-16 12:21 Markus Mottl
1999-01-18 14:59 ` Sylvain BOULM'E
1999-01-18 17:07   ` Problem binding type parameters in modules + subtyping and inheritance Markus Mottl
1999-01-18 19:16     ` Jerome Vouillon
1999-01-18 20:37       ` Markus Mottl
1999-01-19  8:50 ` Hendrik Tews [this message]

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=199901190850.JAA12869@irritatie.cs.kun.nl \
    --to=tews@irritatie.cs.kun.nl \
    --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