A new kind of output marshallers *- (patch attached)

Hello When wrapping libraries that return error codes from functions a monadic output marshaller that does not return a value is very useful. This implements *- output marshallers that take the value and consume it, but don't return a result. This is used like: foo_error_t foo_something(random, arguments); type Err = {#type foo_error_t#} {#fun {`Foo', `Bar'} -> `()' handleError*- #} handleError :: Err -> IO () handleError ... - Einar Karttunen

Hi Einar,
When wrapping libraries that return error codes from functions a monadic output marshaller that does not return a value is very useful. This implements *- output marshallers that take the value and consume it, but don't return a result.
This is used like:
foo_error_t foo_something(random, arguments);
type Err = {#type foo_error_t#}
{#fun {`Foo', `Bar'} -> `()' handleError*- #}
handleError :: Err -> IO () handleError ...
Yes, that certainly makes sense. Thanks for also updating the documentation! I have pushed the patch into the public repo. Thanks for the contribution. Cheers, Manuel
participants (2)
-
Einar Karttunen
-
Manuel M T Chakravarty