<div dir="ltr"><div>Hello,</div><div><br></div><div>I try to use GHC backend via STG. For that reason I build small STG program AST maually. So far the generated programs worked fine (compile/link/run).</div><div>However I run into problems when a lifted ADT has a FloatRep argument.</div><div>Interestingly it works for DoubleRep.</div><div>I'm using GHC 8.6.1 64 bit to generate the code for the constructed STG AST.</div><div>I wonder if I break an invariant or is this actually a bug?</div><div>Is it valid to use FloatRep argument in a boxed ADT on 64 bit?</div><div>I made a gist with the Haskell source and the generated Cmm code is also included.</div><div><br></div><div><a href="https://gist.github.com/csabahruska/e9e143390c863f7b10b0298a7ae80ac1">https://gist.github.com/csabahruska/e9e143390c863f7b10b0298a7ae80ac1</a></div><div><br></div><div>Working program (DoubleRep):<br><a href="https://gist.github.com/csabahruska/e9e143390c863f7b10b0298a7ae80ac1#file-stgsample-hs-L134-L198">https://gist.github.com/csabahruska/e9e143390c863f7b10b0298a7ae80ac1#file-stgsample-hs-L134-L198</a></div><div><br></div><div>Wrong program (FloatRep):</div><div><a href="https://gist.github.com/csabahruska/e9e143390c863f7b10b0298a7ae80ac1#file-stgsample-hs-L64-L132">https://gist.github.com/csabahruska/e9e143390c863f7b10b0298a7ae80ac1#file-stgsample-hs-L64-L132</a></div><div><br></div><div>Thanks,</div><div>Csaba<br></div><div><br></div><div><br></div></div>