Я пытаюсь разобраться в библиотеке Haskell json . Однако я столкнулся с небольшой проблемой в ghci:
Prelude> import Text.JSON
Prelude Text.JSON> decode "[1,2,3]"
:1:0:
Ambiguous type variable `a' in the constraint:
`JSON a' arising from a use of `decode' at :1:0-15
Probable fix: add a type signature that fixes these type variable(s)
Я думаю, что это как-то связано с a в сигнатуре типа:
decode :: JSON a => String -> Result a
Кто-нибудь может показать мне: