Branch bug/clang-opts demonstrates a minimal program to reproduce GC issues due to compile time optimization (any level of optimization appears to trigger this). Note that the various random seeming pure units need to be there to trigger the issue. I have a hunch it's related to type-classes (or hash maps, more generally speaking) - hence the monomorphic versions of bind, pure, and discard for Effect.)
For example, on my machine the example program prints: "test: append" as opposed to "test: quark", for example when compiled with -O3.
Branch bug/clang-opts demonstrates a minimal program to reproduce GC issues due to compile time optimization (any level of optimization appears to trigger this). Note that the various random seeming
pure unit
s need to be there to trigger the issue. I have a hunch it's related to type-classes (or hash maps, more generally speaking) - hence the monomorphic versions ofbind
,pure
, anddiscard
forEffect
.)For example, on my machine the example program prints: "test: append" as opposed to "test: quark", for example when compiled with -O3.