Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006654OCamltypingpublic2014-11-10 15:262017-03-14 10:54
Reporterlpw25 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusconfirmedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionlaterFixed in Version 
Summary0006654: Destructive substitution on classes produces unrepresentable module type
DescriptionIf you apply destructive substitution to a class or class type the type system handles it correctly, but the resulting module type cannot be represented by OCaml's syntax:

    # module type S = sig
        class c : object method
        m : int end
      end;;
    module type S = sig class c : object method m : int end end

    # class d = object method m = 3 end;;
    class d : object method m : int end

    # module type T = S with type c := d;;
    module type T =
      sig
        class c : object method m : int end
        class type c = object method m : int end
        type #c = #d
      end
TagsNo tags attached.
Attached Files

- Relationships
related to 0004791acknowledged ocamlc -i produces incorrect result 

-  Notes
(0017648)
garrigue (manager)
2017-03-14 10:54

Yet another example of signature that cannot be parsed/typed.
Of course we could forbid it, but would it help?
Another solution would be to allow destructive substitution for all declaration, but this is harder.
For the time being, doing nothing seems reasonable.

- Issue History
Date Modified Username Field Change
2014-11-10 15:26 lpw25 New Issue
2015-01-07 19:57 doligez Status new => confirmed
2015-01-07 19:57 doligez Target Version => 4.02.3+dev
2015-07-10 17:48 doligez Target Version 4.02.3+dev => 4.03.0+dev / +beta1
2016-04-18 15:13 doligez Target Version 4.03.0+dev / +beta1 => 4.03.1+dev
2017-02-16 14:01 doligez Target Version 4.03.1+dev => undecided
2017-02-23 16:45 doligez Category OCaml typing => typing
2017-03-14 10:51 garrigue Relationship added related to 0004791
2017-03-14 10:54 garrigue Note Added: 0017648
2017-03-14 10:54 garrigue Severity minor => feature
2017-03-14 10:54 garrigue Target Version undecided => later


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker