Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006240OCamlOCaml typingpublic2013-11-17 18:152013-11-18 02:31
Reporterlpw25 
Assigned Togarrigue 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.01.1+dev 
Summary0006240: Strange error with abstract module types and functors
DescriptionThe following type error appears to be a bug:

          OCaml version 4.01.0
  
  # module M : sig
      module type T
      module F (X : T) : sig end
    end = struct
      module type T = sig end
      module F (X : T) = struct end
    end;;
              module M : sig module type T module F : functor (X : T) -> sig end end
  # module type T = M.T;;
  module type T = M.T
  # module F : functor (X : T) -> sig end = M.F;;
  Characters 40-43:
    module F : functor (X : T) -> sig end = M.F;;
                                            ^^^
  Error: Signature mismatch:
         Modules do not match:
           functor (X : M.T) -> sig end
         is not included in
           functor (X : T) -> sig end
         At position functor (X : <here>) -> ...
         Modules do not match: T is not included in M.T
         At position functor (X : <here>) -> ...
         Unbound module type M.T
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0010637)
garrigue (manager)
2013-11-18 02:31

Fixed in trunk and 4.01, revision 14299 and 14300.

In subtyping, was not expanding the external module type in functor arguments at the right timing.

- Issue History
Date Modified Username Field Change
2013-11-17 18:15 lpw25 New Issue
2013-11-18 02:31 garrigue Note Added: 0010637
2013-11-18 02:31 garrigue Status new => resolved
2013-11-18 02:31 garrigue Fixed in Version => 4.01.1+dev
2013-11-18 02:31 garrigue Resolution open => fixed
2013-11-18 02:31 garrigue Assigned To => garrigue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker