Re:Show HN: Hsrs – Type-Safe Haskell Bindings Generator for ...
by Yatsui on Thursday May 21, 2026 @03:46AM
(#48219217)
Nice work. One thing I didn't see covered: what happens when a #[hsrs::function] panics? Unwinding across the FFI boundary into the Haskell RTS is UB, so I assume there's a catch_unwind somewhere converting it into a Haskell exception, or do panics just abort the process?
[ Parent
| on HN ]
Re:Show HN: Hsrs – Type-Safe Haskell Bindings Generator for ...
by suis_siva on Tuesday May 26, 2026 @03:06AM
(#48276151)
Ooh! Sorry for the late reply, missed this. If #[hsrs::function]s panic, the Haskell runtime crashes so everything gets aborted. I wasn't really thinking about this, to be honest, but it's definitely a *very* good point!
I'll put it on the list of things for the next release! Thanks =)