Issue 18 in ocaml-extlib: OptParse.OptParser.error should return 'a not unit

3 views
Skip to first unread message

codesite...@google.com

unread,
Sep 1, 2010, 10:38:46 PM9/1/10
to ocaml-extlib-...@googlegroups.com
Status: New
Owner: ----

New issue 18 by headch: OptParse.OptParser.error should return 'a not unit
http://code.google.com/p/ocaml-extlib/issues/detail?id=18

The error function is guaranteed to always terminate the process rather
than returning. Therefore, it should be declared as returning 'a (that is,
*anything*) rather than unit. This means it can be called in e.g.
conditional branches where values would otherwise be required. I see that
the last line of the error function is call to Pervasives.exit (in the
manual exit's return type is declared as 'a I believe for this exact
reason) so this is a change to interface only that doesn't require any
changes to the implementation.

codesite...@google.com

unread,
Nov 12, 2013, 10:35:58 AM11/12/13
to ocaml-extlib-...@googlegroups.com
Updates:
Status: Fixed

Comment #1 on issue 18 by ygrekheretix: OptParse.OptParser.error should
This issue was closed by revision r420.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages