Что не так с этой функцией?
test :: Show s => s
test = "asdasd"
Строка является экземпляром класса Show
, поэтому это кажется правильным.
Ошибка
src\Main.hs:224:7:
Couldn't match expected type `s' against inferred type `[Char]'
`s' is a rigid type variable bound by
the type signature for `test' at src\Main.hs:223:13
In the expression: "asdasd"
In the definition of `test': test = "asdasd"