
hi, data StringOrInt = TisanInt Int | TisAString String instance Eq (StringOrInt) where (==) (TisanInt v) (TisanInt v') = v == v' (==) (TisAString s) (TisAString s') = s == s' prelude> Instance_testen.hs:4:37: error: Ambiguous occurrence ‘==’ It could refer to either ‘Prelude.==’, imported from ‘Prelude’ at Instance_testen.hs:1:1 (and originally defined in ‘GHC.Classes’) or ‘Main.==’, defined at Instance_testen.hs:4:1 | 4 | (==) (TisanInt v) (TisanInt v') = v == v' | ^^ Instance_testen.hs:5:41: error: Ambiguous occurrence ‘==’ It could refer to either ‘Prelude.==’, imported from ‘Prelude’ at Instance_testen.hs:1:1 (and originally defined in ‘GHC.Classes’) or ‘Main.==’, defined at Instance_testen.hs:4:1 | 5 | (==) (TisAString s) (TisAString s') = s == s' | ^^ [1 of 1] Compiling Main ( Instance_testen.hs, interpreted ) Failed, no modules loaded. what gives?