[C2hs] A new kind of output marshallers *- (patch attached)
Manuel M T Chakravarty
chak at cse.unsw.edu.au
Tue Sep 12 22:19:13 EDT 2006
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
More information about the C2hs
mailing list