I am new to Haskell and i'm trying to learn how to use classe,
I have the class:
class SomeClass f where
doSome :: Integer -> f
the data type:
data SomeData = D1 Integer
| D2 SomeData SomeData
and I'm trying to create the instance:
instance SomeClass SomeData where
doSome x = D1 x
but the ghci gives me the error:
Couldn't match expected type ‘f’ with actual type ‘SomeClass’
I've seen some question regarding this issue, but i couldn't make them work for me.
how can i fix this?
do
. Can you provide your actual code? – Reid Barton