| Anonymous | Login | Signup for a new account | 2013-05-23 12:38 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0005847 | OCaml | OCaml typing | public | 2012-12-05 14:25 | 2012-12-05 20:59 | |||||||
| Reporter | guesdon | |||||||||||
| Assigned To | frisch | |||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||||||
| Status | resolved | Resolution | suspended | |||||||||
| Platform | OS | OS Version | ||||||||||
| Product Version | 4.00.2+dev | |||||||||||
| Target Version | Fixed in Version | |||||||||||
| Summary | 0005847: module T1 = T2 does not result in (module T1) = (module T2) as types | |||||||||||
| Description | The following code: module type T1 = sig end let foo t = let module T = (val t : T1) in () ;; module type T2 = T1 let bar (t : (module T2)) = foo t;; gives the following error message: File "mtype.ml", line 11, characters 32-33: Error: This expression has type (module T2) but an expression was expected of type (module T1) I expected T2 to be equal to T1 but it doesn't seem to the case. Am I missing something ? | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Notes |
|
|
(0008569) frisch (developer) 2012-12-05 16:39 |
The equality of packages types is based on the path equivalence of module types. In other words, we use nominal typing for first-class modules. This is the current expected behavior. Maybe it will be relaxed in the future, but there is no concrete plans to do so. |
|
(0008572) guesdon (manager) 2012-12-05 20:59 |
Ok. Sorry, I missed it in the doc (I see it now). |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-12-05 14:25 | guesdon | New Issue | |
| 2012-12-05 15:04 | gasche | Summary | module T1 = T2 does not result in T1 = T2 => module T1 = T2 does not result in (module T1) = (module T2) as types |
| 2012-12-05 16:39 | frisch | Note Added: 0008569 | |
| 2012-12-05 16:39 | frisch | Status | new => resolved |
| 2012-12-05 16:39 | frisch | Resolution | open => suspended |
| 2012-12-05 16:39 | frisch | Assigned To | => frisch |
| 2012-12-05 20:59 | guesdon | Note Added: 0008572 | |
| Copyright © 2000 - 2011 MantisBT Group |