<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">So -O0 didn't help.</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Nevertheless, ghc suggests to read it from file :-)</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">"...</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">ghc: sorry! (unimplemented feature or known bug)</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"> (GHC version 8.6.3 for x86_64-unknown-linux):</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"> Trying to allocate more than 129024 bytes.</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">This is currently not possible due to a limitation of GHC's code generator.</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">See http://hackage.haskell.org/trac/ghc/ticket/4505 for details.</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Suggestion: read data from a file instead of having large static data</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">structures in code.</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">..."</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">It seems that splitting the list into several modules (several thousands of elements per list are OK) works. Moreover, as it is generated, several modules can be generated too. And even more, efficiency is not affected (the same execution time and -O2 used for all modules).</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Regards (and over :-))</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Dušan</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">On pátek 29. ledna 2021 13:22:24 CET Henning Thielemann wrote:</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> On Fri, 29 Jan 2021, Sylvain Henry wrote:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > Could you open a GHC ticket with a reproducing example?</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > It looks similar to https://gitlab.haskell.org/ghc/ghc/-/issues/16577 so</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > you may have more chance with `-O0`.</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> If disabling optimization helps, then it might be useful to disable it</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> only for this module by adding a pragma to the top of the module:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> {-# OPTIONS_GHC -O0 #-}</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> _______________________________________________</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> Haskell-Cafe mailing list</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> To (un)subscribe, modify options or view archives go to:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> Only members subscribed via the mailman list are allowed to post.</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">-- </p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"> Dusan Kolar tel: +420 54 114 1238</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"> UIFS FIT VUT Brno fax: +420 54 114 1270</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"> Bozetechova 2 e-mail: kolar@fit.vut.cz</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"> Brno 612 66</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"> Czech Republic</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">--</p>
<br /></body>
</html>