When I run anythingToString on DynFlags (from GHC api) I get a crash.
Specifically, the problem is with the "rawSettings" field. This is interesting because the type of "rawSettings" is [(String, String)]
Doing a regular print works fine, but anythingToString causes a segfault. I tried running through GDB but did not get any useful backtrace or extra helpful information.
All the other fields of DynFlags work great with anythingToString
test :: DynFlags -> IO ()
test df = do
print (rawSettings df) -- This successfully prints the value
putStrLn (anythingToString (rawSettings df)) -- This crashes
Thank you