Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006113OCamlOCaml generalpublic2013-08-01 08:372013-09-18 16:34
Assigned To 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0006113: listing the available toplevel directives with #help

It would be nice if there was a way to list
all the directives the toplevel understands
(plus a short description for each, at least).

Tagsjunior_job, patch
Attached Filespatch file icon print_directives.patch [^] (9,039 bytes) 2013-08-04 21:36 [Show Content]

- Relationships

-  Notes
gian (reporter)
2013-08-04 21:40

I've made a patch for this.
- Printing on large descriptions looks bad in my opinion, so I made small descriptions based on the ones on Caml's manual. Perhaps someone more knowledgeable can provide better descriptions.
- In order to maintain compatibility with other programs that add directives to the compiler I had to make a second hashtable with the names as key and the descriptions as value. To avoid such problems in the future I added a new function that handles new entries to the hashtable. Perhaps the new hashtable can be changed to hold a list of strings as information instead of just the description.
- #help will print all directives (including directives that have been added by other libraries) along with their description if it exists. It will only look for directives on the original hashtable (so directives from other libraries) if the size of the hashtables don't match.

- Issue History
Date Modified Username Field Change
2013-08-01 08:37 berenger New Issue
2013-08-01 08:55 gasche Tag Attached: junior_job
2013-08-01 11:33 xleroy Status new => acknowledged
2013-08-04 21:36 gian File Added: print_directives.patch
2013-08-04 21:40 gian Note Added: 0010094
2013-09-18 16:34 lpw25 Tag Attached: patch

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker