Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004829OCamlOCaml generalpublic2009-06-22 17:232014-09-26 17:35
ReporterEtienne Millon 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version3.11.1+rc1 
Target Version4.03.0+devFixed in Version 
Summary0004829: Recursive modules which do not type
DescriptionHere is a piece of code with recursive modules that does not type :
=======================================

module type BSig =
sig
  type t
  val f: t -> unit
end

module type ASig = functor(B: BSig) ->
sig
  type t
  val g: B.t -> unit
end

module Make(C: BSig) =
struct
  type t = int
  let g _ = ()
end

module MakeA = (Make: ASig)

module rec A:
sig
  type t
  val g: B.t -> unit
end
= MakeA(B)

and B:
sig
  type t = int * A.t
  val f: t -> unit
end
=
struct
  type t = int * A.t

  let f x = A.g x (* does not type *)
(*
  let f (a, b) = A.g (a, b) (* types correctly *)
 *)
end

=========================

Note that if function f is replaced by the commented version, then the type
checker succeeds. Even though, this code modification is only giving the
additional information that the argument of f is a pair.
Additional InformationThis code used to compile with Ocaml 3.10.0 but does not with 3.10.2 and 3.11.1
Tagsrecmod
Attached Files

- Relationships

-  Notes
(0007910)
xleroy (administrator)
2012-08-06 18:24

I've been sleeping on these PR for too long, and still have no idea how to address them. Unassigning them from myself.

- Issue History
Date Modified Username Field Change
2009-06-22 17:23 Etienne Millon New Issue
2011-05-31 15:54 doligez Status new => assigned
2011-05-31 15:54 doligez Assigned To => xleroy
2012-07-11 14:24 doligez Target Version => 4.01.0+dev
2012-07-31 13:36 doligez Target Version 4.01.0+dev => 4.00.1+dev
2012-08-06 18:22 xleroy Target Version 4.00.1+dev => 4.01.0+dev
2012-08-06 18:24 xleroy Note Added: 0007910
2012-08-06 18:25 xleroy Assigned To xleroy =>
2012-08-06 18:25 xleroy Status assigned => acknowledged
2013-08-12 15:44 doligez Tag Attached: recmod
2013-08-12 15:44 doligez Target Version 4.01.0+dev => 4.01.1+dev
2014-05-25 20:20 doligez Target Version 4.01.1+dev => 4.02.0+dev
2014-07-31 16:12 doligez Target Version 4.02.0+dev => 4.02.1+dev
2014-09-04 00:25 doligez Target Version 4.02.1+dev => undecided
2014-09-26 17:35 doligez Target Version undecided => 4.03.0+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker