[Haskell-beginners] instance

Alexander Chen alexander at chenjia.nl
Wed Apr 22 18:10:23 UTC 2020


Hi,

data TisanInteger = Tisan Integer

instance Eq (Tisan Integer) where (Tisan v) == (Tisan v') = v == v'

prelude>
Instance_testen.hs:7:14: error:
    Not in scope: type constructor or class ‘Tisan’
    A data constructor of that name is in scope; did you mean DataKinds?
  |
7 | instance Eq (Tisan Integer) where (Tisan v) == (Tisan v') = v == v'   |              ^^^^^
[1 of 1] Compiling Main             ( Instance_testen.hs, interpreted )
Failed, no modules loaded.

what am i doing wrong?

best,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20200422/210a8b0c/attachment.html>


More information about the Beginners mailing list