Failure to catch C++ exception in Haskell on OS X

Carter Schonwald carter.schonwald at
Sat Jan 5 22:46:56 UTC 2019

Are we talking about Haskell or linking/ calling c plus plus? If the
latter, that’s more of a cabal issue I think?

If you mean ghc build wise
No. The unwind library only supports elf format. Which OS X does not use.

Even that issue aside : ghc currently can’t build with any level of dwarf
enabled on OS X, eg the system linker complains about exceeding some system
section object format limit.

I guess my point is : dwarf data for Haskell libraries on OS X have a few
challenges between here and there.

On Fri, Jan 4, 2019 at 9:29 PM Bas van Dijk <v.dijk.bas at> wrote:

> On Fri, 4 Jan 2019 at 23:46, Adam Sandberg Eriksson
> <adam at> wrote:
> > A ticket which seems to cover the same problem:
> Wonderful! I can confirm[1] that adding the following to the cabal
> file fixes the problem:
>   if os(darwin)
>     ld-options: -Wl,-keep_dwarf_unwind
> Shouldn't GHC do this by default when linking on OS X?
> Bas
> [1]
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list