Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* possible infinite loop in compiler
@ 2007-04-25 13:24 Craig Falls
  2007-04-25 23:49 ` [Caml-list] " Jon Harrop
  0 siblings, 1 reply; 3+ messages in thread
From: Craig Falls @ 2007-04-25 13:24 UTC (permalink / raw)
  To: caml-list

The following code blows the stack in ocamlc and ocamlopt 3.09.3:

module Foo : sig
   type 'a t = private 'a constraint 'a = [< `foo ]
 end = struct
   type 'a t = 'a constraint 'a = [< `foo ]
 end

Other row types such as [> `foo ] also cause the error.  The following
version returns a confusing (to me) error message:

module Foo : sig
   type 'a t = private 'a constraint 'a = [< `foo ]
 end = struct
   type 'a t = private 'a constraint 'a = [< `foo ]
 end

Signature mismatch:
 Modules do not match:
   sig type 'a t = private 'a constraint 'a = [< `foo ] end
 is not included in
   sig type 'a t = private 'a constraint 'a = [< `foo ] end
 Type declarations do not match:
   type 'a t = private 'a constraint 'a = [< `foo ]
 is not included in
   type 'a t constraint 'a = [< `foo ]


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

end of thread, other threads:[~2007-04-26  0:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-25 13:24 possible infinite loop in compiler Craig Falls
2007-04-25 23:49 ` [Caml-list] " Jon Harrop
2007-04-26  0:16   ` Jacques Garrigue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox