Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002737OCamlOCaml generalpublic2004-06-17 02:442012-01-30 15:09
Reporteradministrator 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version3.12.0 
Summary0002737: sig_of_struct
DescriptionFull_Name: Evgeny Chukreev
Version:
OS:
Submission from: 81.176.98.115 (81.176.98.115)


Feature wish:
  It's impossible now to write code like:

  module B =
  struct
      (* blah-blah-blah *)
  end

  module type A =
  sig
      (* blah-blah-blah *)

      include (sig_of_struct B)
  end

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000225)
administrator (administrator)
2004-06-17 10:16

> Full_Name: Evgeny Chukreev
>
> Feature wish:
> It's impossible now to write code like:
>
> module B =
> struct
> (* blah-blah-blah *)
> end
>
> module type A =
> sig
> (* blah-blah-blah *)
>
> include (sig_of_struct B)
> end

This is also a feature I would like to have.
However, there is a small "moral" problem: as the signature of B is
not given explicitly, you are relying on the type checker to produce,
and it could be for instance more general than you expected.
I.e. a function may be more polymorphic than expected, and as a result
the signature produced would be incompatible with the expected one.
I don't see it as a major problem, but it may be a religious issue for
some.

On the other hand, it should be possible at least to have a weaker
feature: have the .mli define a module type.
This would make easier providing a signature to an extended module.

Jacques

(0006839)
doligez (administrator)
2012-01-30 15:09

This is the "module type of" feature that was introduced in 3.12.0.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue
2012-01-30 15:09 doligez Note Added: 0006839
2012-01-30 15:09 doligez Status acknowledged => closed
2012-01-30 15:09 doligez Resolution open => fixed
2012-01-30 15:09 doligez Fixed in Version => 3.12.0
2012-01-30 15:09 doligez Description Updated View Revisions


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker