I had a datatype, example:
data MyData = Something1 String
and then I had a function
myFunction :: MyData -> String
myFunction x = x
within myFunction I want to refer to the characters ie ['S','o','m','e'......'1'] which are in my data type MyData. However, I get the following error:
Couldn't match expected type
[Char]' with actual typeMyData' Expected type: String Actual type: MyData
As far as I understand [Char] is the same as String, and I have declared 'Something1' as String, so it should work?