| Anonymous | Login | Signup for a new account | 2013-05-22 04:05 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 | ||||||
| 0004989 | OCaml | OCaml general | public | 2010-03-01 13:16 | 2010-04-18 10:53 | ||||||
| Reporter | hattori | ||||||||||
| Assigned To | |||||||||||
| Priority | normal | Severity | feature | Reproducibility | always | ||||||
| Status | acknowledged | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 3.11.1 | ||||||||||
| Target Version | Fixed in Version | ||||||||||
| Summary | 0004989: Compiler rejects recursive definitions of values | ||||||||||
| Description | Compiler rejects thw following definition: # let rec f = let g = fun x -> f x in g;; Error: This kind of expression is not allowed as right-hand side of `let rec' However, the following definition is OK: # let rec f = let g = f in fun x -> g x;; val f : 'a -> 'b = <fun> It seems that the first definition is also OK according to the reference manual (section 7.3). | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0005319) xleroy (administrator) 2010-04-18 10:53 |
The checking of recursive value definitions is syntactic in nature and rather subtle. In your case, the criteria used do not distinguish between your example and "let rec f = let g = f in g", which would be semantically ill-defined indeed (just like "let rec f = f"). I'll keep this PR as a feature wish, but I'm afraid it's not going to be addressed any time soon. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2010-03-01 13:16 | hattori | New Issue | |
| 2010-04-18 10:53 | xleroy | Note Added: 0005319 | |
| 2010-04-18 10:53 | xleroy | Severity | minor => feature |
| 2010-04-18 10:53 | xleroy | Status | new => acknowledged |
| Copyright © 2000 - 2011 MantisBT Group |