Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007216OCaml~DO NOT USE (was: OCaml general)public2016-04-07 19:152016-12-13 09:25
Reportersliquister 
Assigned Togarrigue 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.02.3 
Target Version4.03.1+devFixed in Version4.05.0 +dev/beta1/beta2/beta3/rc1 
Summary0007216: Too many parens required in first class module syntax
Description# include A(val x);;
Error: Syntax error
# include A((val x));;
Error: Unbound value x
TagsNo tags attached.
Attached Filesdiff file icon paren_module_expr.diff [^] (1,250 bytes) 2016-04-08 10:33 [Show Content]

- Relationships

-  Notes
(0015693)
garrigue (manager)
2016-04-08 10:33

This is originally designed to avoid any syntactic conflict between the core and module levels.
I see at least two way it could be improved:
* By allowing to omit the parenthesis where there is no (potential) ambiguity, i.e. everywhere except functor positions.
   In theory it's ok, but one would have to fix the conflicts by hand. Painful.
* Just remove the need for double parentheses.
   I.e. create a paren_module_expr non-terminal, which can be used directly as argument to a functor.

The second option is much simpler. I include a patch that seems to work.
(0016299)
sliquister (reporter)
2016-09-14 14:27

I ran into this issue of having to write double parens again. Any chance this patch can be merged? The patch looks good to me (the error case that's removed is now covered by an error case that was there for parenthesized module expr, if someone is curious), and it works as intended.
(0016977)
shinwell (developer)
2016-12-12 17:21

@sliquister Please provide a Github PR with the patch, thanks.
(0016989)
garrigue (manager)
2016-12-13 01:53

This is GPR#949 (almost ready to merge).
(0016990)
garrigue (manager)
2016-12-13 09:25

GPR#949 merged at commit d8fc8dce.

- Issue History
Date Modified Username Field Change
2016-04-07 19:15 sliquister New Issue
2016-04-08 10:33 garrigue Note Added: 0015693
2016-04-08 10:33 garrigue File Added: paren_module_expr.diff
2016-04-12 16:22 doligez Status new => acknowledged
2016-04-12 16:22 doligez Target Version => 4.03.1+dev
2016-09-14 14:27 sliquister Note Added: 0016299
2016-12-12 17:21 shinwell Note Added: 0016977
2016-12-13 01:53 garrigue Note Added: 0016989
2016-12-13 09:25 garrigue Note Added: 0016990
2016-12-13 09:25 garrigue Status acknowledged => resolved
2016-12-13 09:25 garrigue Fixed in Version => 4.05.0 +dev/beta1/beta2/beta3/rc1
2016-12-13 09:25 garrigue Resolution open => fixed
2016-12-13 09:25 garrigue Assigned To => garrigue
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker