Hello,
I have function with following signature:
get :: a -> Value b
I don't know concrete type of b. It can be Value Int or Value String or something else. How can i to write function only for testing? I need something like this:
get :: a -> Value b
get k = (Value "some_data"')
but i got error:
Couldn't match expected type `b' with actual type `[Char]'
`b' is a rigid type variable bound by
the type signature for get :: a -> Value b
at Test.hs:39:8
In the first argument of `Value', namely `"some_data"'
In the expression: (Value "some_data")
In an equation for `get': get k = (Value "some_data")
Failed, modules loaded: none.
Value data declaration:
data Value b = Value b deriving (Show)
Thank you.