나는 툠의 아이손 튜토리얼을 통해 일하고 있어요, 자신이 조각으로 구분 한 : 내가 눈치 챘을이 스 니펫에는 유형 유추가 어떻게 유추 되나요?
parseFoo (Object obj) = do
a <- case HM.lookup "a" obj of
Just x -> parseJSON x
Nothing -> fail "no field 'a'"
return a
을하는 I return True
는, 나는 "모호한 참조"오류 얻을 경우 :
No instance for (FromJSON t0) arising from a use of ‘parseJSON’
The type variable ‘t0’ is ambiguous
Note: there are several potential instances:
...
을 비 모호한 사건의 유형은
parseFoo :: FromJSON b => Value -> Parser b
내 질문은 왜 a
가을 (어떻게) 필요합니까,이다 유형을 유추하는3210 문장?