mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 01:13:30 +00:00
Estimated hours taken: 6 Branches: main Add the foreign proc. attribute `will_not_throw_exception'. This allows the user to promise the exception analysis that foreign procs that do not have determinism erroneous and make calls back to Mercury will not throw an exception. The behaviour for erroneous foreign procs and those that do not make calls back to Mercury is unchanged. compiler/prog_data.m: compiler/prog_io_pragma.m: Handle the new attribute. compiler/exception_analysis.m: If the user has provided the `will_not_throw_exception' attribute on a foreign proc that makes calls back to Mercury then set then have the exception analysis take account of this information. Fix a typo. compiler/det_analysis.m: compiler/det_report.m: Emit an error if the `will_not_throw_exception' attribute is used on foreign procs. that have been declared erroneous. doc/reference_manual.texi: Mention the new foreign proc attribute. tests/term/Mmakefile: tests/term/Mercury.options: tests/term/promise_no_throw_exception.m: tests/term/promise_no_throw_exception.trans_opt_exp: tests/invalid/Mmakefile: tests/invalid/erroneous_promise_throw.m: tests/invalid/erroneous_proimse_throw.err_exp: Test cases for the above. vim/syntax/mercury.vim: Highlight the annotation appropriately.
Mercury Syntax Highlighting Under Vim 6.0 1. Create a diretory `~/.vim': $ mkdir ~/.vim 2. Copy everything recursively from this directory into `~/.vim': $ cp -r . ~/.vim IMPORTANT: If you already have a file `~/.vim/after/filetype.vim' then you should copy the files from this directory one by one, except for `after/filetype.vim' which you should append to your own `~/.vim/after/filetype.vim'. 3. Ensure you have the following lines in your `~/.vimrc' file: filetype on filetype plugin on syntax enable 4. If you wish to change the colour scheme used by Vim's syntax highlighting, we suggest you put the necessary commands in `~/.vim/colors/mycolours.vim' and append the following to the above list of commands in your `~/.vimrc': colors mycolours 4. Vim will load `~/.vim/syntax/mercury.vim' and `~/.vim/ftplugin/mercury.vim' automatically when opening a .m or .moo file. The syntax file describes two options you may wish to alter from your `~/.vimrc' file. The ftplugin file defines a number of useful keyboard mappings you may wish to consider.