Missing nullable annotation on the return value of gio_volume_get_mount
Submitted by Arthur Nieuwland
Link to original bug (#794418)
Description
When calling gio's gio_volume_get_mount through the Haskell bindings haskell-gi, Haskell complained of receiving a null which it shouldn't, according to the introspection data. As garetxe described it on the haskell-gi bugtracker:
The issue was that the C function was returning NULL, but the introspection data said that that was not a possibility. In these cases haskell-gi checks anyway, and raises the exception you saw if NULL is returned when it is not expected. It cannot do much else, since it is not possible to build a valid Gio.Mount out of NULL. For nullable values, the right representation is Maybe Gio.Mount instead, with NULL -> Nothing.
[1] https://github.com/haskell-gi/haskell-gi/issues/139 bug report for haskell-gi