S.D.Mechveliani writes:
> Hello, people,
>
>
> Please, why the project does not link?
>
...
> Now, remove this -Onot from <D>/docon/Makefile and prepare the
> optimized DoCon by
> cd <D>/docon; rm export/* ; make all
>
> Then the above test with cubeext.hs, it cannot link: ... make Main.o
>
> reports that in libDocon.a Pol1_ references to certain item which
> it cannot find in Ring0_.
> Pol1_, Ring0_ are the modules from DoCon.
>
Hi,
sorry about the delay - this is caused by a bug in the simplifier
when dealing with newtypes. The following rewrite for single
constructor data types
case e of y -> b
===>
case e of (Con a1 .. an) -> let y = Con a1 .. an in b
does not apply for newtypes, since we don't generate constructors
for them. (I'm guessing that subsequent simplifications have masked
this problem from not having been exposed earlier.)
Since reporting this problem, I see that you've released another
version of DoCon - am I right in assuming that you've managed to work
around this problem? If not, then a workaround until the next ghc
release is to change Ring0_.Vector from being a newtype into a single
constructor data type.
Many thanks for reporting this.
--Sigbjorn