From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 3A82B7FD92 for ; Fri, 10 Jun 2016 22:00:23 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.26,451,1459807200"; d="scan'208";a="180892581" Received: from amontsouris-551-1-55-222.w90-24.abo.wanadoo.fr (HELO pl-59055.rocqadm.inria.fr) ([90.24.174.222]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES256-GCM-SHA384; 10 Jun 2016 22:00:22 +0200 Received: from shindere by pl-59055.rocqadm.inria.fr with local (Exim 4.87) (envelope-from ) id 1bBSbO-0000Xc-0F for caml-list@inria.fr; Fri, 10 Jun 2016 22:00:22 +0200 Date: Fri, 10 Jun 2016 22:00:21 +0200 From: =?utf-8?Q?S=C3=A9bastien?= Hinderer To: caml-list@inria.fr Message-ID: <20160610200021.GA2068@pl-59055.rocqadm.inria.fr> Mail-Followup-To: caml-list@inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Subject: [Caml-list] Error: The type abbreviation t is cyclic while defining submodules Dear all, Assume the following code in a file points.ml: type t = float * float let compare = Pervasives.compare (* Other functions on points *) module OrderedPoints : Set.OrderedType with type t = t = struct type t = t let compare = compare end module PointSet : Set.S with type t = t = Set.Make(OrderedPoints) The line type t = t yields the above mentionned error. Is there a way to let the compiler know that the t appearing after the "=" sign refers to the type defined at points.ml top level? Thanks! Sébastien.