<div>Source: <a href="https://github.com/mcandre/genetics">https://github.com/mcandre/genetics</a></div><div><br></div><div>With <font class="Apple-style-span" face="&#39;courier new&#39;, monospace">{-# LANGUAGE TypeSynonymInstances #-}</font> , my genetic algorithm code compiles and runs perfectly.<br clear="all">

<div><br></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">$ make</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">$ ./helloga</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">...</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">hellowobld</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">helloworyd</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">helloporld</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">hellyworld</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">helloworrd</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">hellowofld</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">hellpworld</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Best candidate: helloworld</font></div><div><br>

</div><div>Without it, Haskell refuses to declare an instance on Strings.</div><div><br></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">$ make</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">ghc --make -O2 -fforce-recomp helloga.hs</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">[1 of 2] Compiling Genetics ( Genetics.hs, Genetics.o )</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">[2 of 2] Compiling Main ( helloga.hs, helloga.o )</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">helloga.hs:27:10:</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">     Illegal instance declaration for `Gene String&#39;</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">       (All instance types must be of the form (T t1 ... tn)</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">       where T is not a synonym.</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">       Use -XTypeSynonymInstances if you want to disable this.)</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">     In the instance declaration for `Gene String&#39;</font></div>

<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">make: *** [all] Error 1</font></div><div><br></div><div>The fix is easy to discover and apply, but this is my first typeclass, nothing complicated. As a newbie I prefer that it &quot;just works&quot; without my having to use the special compile flag.</div>

<div><br></div>Cheers,<div><br></div><div>Andrew Pennebaker</div><div><a href="http://www.yellosoft.us" target="_blank">www.yellosoft.us</a></div><br>
</div>