1
에서 기능 유형을 변경 I가 기본적으로이 유형이 함수 :하스켈
func:: Integer -> (Integer,Integer) -> [[String]] -> ([Char],[Char],[Char],[Char]) -> (Int,Int)
:
func :: Integer -> (Integer,Integer) -> [[String]] -> ([Char],[Char],[Char],[Char]) -> (Integer,Integer)
그러나 나는 내가 쓴 때 (INT, int)를 반환 할을 홈페이지> : L 플레이
ERROR "play.hs":64 - Type error in explicitly typed binding
*** Term : func
*** Type : Integer -> (Integer,Integer) -> [[String]] -> ([Char],[Char],[Char],[Char]) -> (Integer,Integer)
*** Does not match : Integer -> (Integer,Integer) -> [[String]] -> ([Char],[Char],[Char],[Char]) -> (Int,Int)
어떻게이 문제를 해결할 수 있습니다 나는이 오류가? 감사.
'Int'는 '정수'가 아닙니다. 하스켈은 숫자 타입 사이의 암묵적인 변환을 가지고 있지 않습니다. – nymk
@nymk 해결할 제안이 있으십니까? 감사. – jason