Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006306OCamlOCaml generalpublic2014-01-26 21:072014-07-16 15:06
Reportergasche 
Assigned To 
PrioritylowSeveritytweakReproducibilityN/A
StatusconfirmedResolutionopen 
PlatformOSOS Version
Product Version4.02.0+dev 
Target Version4.03.0+devFixed in Version 
Summary0006306: [style patches] use (@@) to reduce parentheses in typing/predef.ml and asmcomp/cmmgen.ml
DescriptionThe two attached patches make use of the new-in-4.01 standard operator (@@) to avoid wall-of-closing-parenthesis in predef.ml and cmmgen.ml.

The patch in predef would simplify maintenance as it makes adding or removing predefined types (marginally) simpler -- I thought of it while reviewing BenoƮt's GADT patches.

The patch in cmmgen harmonizes the use of the monadic-like "bind" operator, and also remove some extraneous parentheses. I think it is of (even) lesser importance.
Additional InformationIn cmmgen.ml I used (@@) only bind was used more than once in a sequence. If someone thinks it's better to consistently use (@@) everywhere, I'd be happy to make this additional change.
Tagspatch
Attached Filestxt file icon 0001-use-to-avoid-wall-of-parens-in-typing-predef.ml.patch.txt [^] (3,298 bytes) 2014-01-26 21:07 [Show Content]
txt file icon 0002-use-for-sequences-of-bind-in-asmcomp-cmmgen.ml.patch.txt [^] (21,171 bytes) 2014-01-26 21:10 [Show Content]

- Relationships

-  Notes
(0010859)
waern (reporter)
2014-01-29 14:25
edited on: 2014-01-29 14:25

If you use an infix operator like (>>=) instead of bind, you don't need any parenthesis and you don't need (@@).


- Issue History
Date Modified Username Field Change
2014-01-26 21:07 gasche New Issue
2014-01-26 21:07 gasche File Added: 0001-use-to-avoid-wall-of-parens-in-typing-predef.ml.patch.txt
2014-01-26 21:08 gasche File Added: 0002-use-for-sequences-of-bind-in-asmcomp-cmmgen.ml.patch.txt
2014-01-26 21:09 gasche File Deleted: 0002-use-for-sequences-of-bind-in-asmcomp-cmmgen.ml.patch.txt
2014-01-26 21:10 gasche File Added: 0002-use-for-sequences-of-bind-in-asmcomp-cmmgen.ml.patch.txt
2014-01-26 21:11 gasche Additional Information Updated View Revisions
2014-01-29 14:25 waern Note Added: 0010859
2014-01-29 14:25 waern Note Edited: 0010859 View Revisions
2014-02-19 20:08 doligez Tag Attached: patch
2014-07-16 15:06 doligez Status new => confirmed
2014-07-16 15:06 doligez Target Version => 4.03.0+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker