<div dir="ltr">Hello cafe,<div><br></div><div>I am trying to develop a <a href="https://github.com/odr/perst/tree/a5c59833742f4cde35bbeb80394094fa1c0972a7">library PersT</a> for working with database persistent in types (instead of e.g. template-haskell in persistent library).</div><div>Now there are base DDL/DML functionality and additional DML functionality for tree-like structures.</div><div>Small dirty example of using it is located <a href="https://github.com/odr/perst/blob/a5c59833742f4cde35bbeb80394094fa1c0972a7/perst-sqlite/app/Main.hs">here</a>.</div><div><br></div><div>The main problem which I have is compile time.</div><div>Compiling of my small example (five tables with five fields) needs 7 minutes and more than 6Gb RAM (!)</div><div>I compile using stack and ghc 8.0.2. </div><div>To check you need additionally only sqlite installed.</div><div><br></div><div>Are there any ways to reduce resource utilization in compile time? </div><div>Is it some problem in ghc which can be changed in future?</div><div><br></div><div>What do you think?</div><div><br></div><div>I also will be thankful for any feedback about library.</div><div><br></div><div>Regards,</div><div>Dima</div></div>