<div dir="ltr">Hi,<div><br><div><div style="font-size:13px"><font face="monospace">data TisanInteger = Tisan Integer</font></div><div style="font-size:13px"><font face="monospace">instance Eq (<b><font color="#ff0000">Tisan Integer</font></b>) where (Tisan v) == (Tisan v') = v == v'</font></div></div><div style="font-size:13px"><i><font face="monospace"><br></font></i></div><div style="font-family:Arial;font-size:13px">I think the part in red is the error: you should write <b><font color="#00ff00">TisanInteger</font></b> instead (with no space between Tisan and Integer):</div><div style="font-family:Arial;font-size:13px">This is because there you should put the name of the data, not its definition.</div><div style="font-family:Arial;font-size:13px"><br></div><div style="font-family:Arial;font-size:13px">Best,</div><div style="font-family:Arial;font-size:13px"><br></div><div style="font-family:Arial;font-size:13px">Ut</div><div style="font-family:Arial;font-size:13px"><i><br></i></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mer 22 apr 2020 alle ore 20:11 Alexander Chen <<a href="mailto:alexander@chenjia.nl">alexander@chenjia.nl</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-family:Arial;font-size:13px">Hi,<div><br></div><div><i><br></i></div><div><div><i>data TisanInteger = Tisan Integer</i></div><div><i><br></i></div><div><i>instance Eq (Tisan Integer) where (Tisan v) == (Tisan v') = v == v'</i></div><div><i><br></i></div><div><i>prelude></i></div><div><i>Instance_testen.hs:7:14: error:</i></div><div><i> Not in scope: type constructor or class ‘Tisan’</i></div><div><i> A data constructor of that name is in scope; did you mean DataKinds?</i></div><div><i> |</i></div><div><i>7 | instance Eq (Tisan Integer) where (Tisan v) == (Tisan v') = v == v' | ^^^^^</i></div><div><i>[1 of 1] Compiling Main ( Instance_testen.hs, interpreted )</i></div><div><i>Failed, no modules loaded.</i></div><div><br><br></div><div><br></div><div>what am i doing wrong?</div><div><br></div><div>best,<br><div><div style="font-family:Arial;font-size:13px"><br></div></div></div></div></div>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div>