내가구문 분석 오류 (아마도 잘못된 들여 쓰기) 내가 다음 코드 줄을 실행할 때
TyInfer.hs:115:0: parse error (possibly incorrect indentation)
사람이 문제가 무엇인지 나를 설명 할 수있는 다음과 같은 오류를 얻을.
type Subst = [(TyVar, Type)]
-- ---------------------------------------------------------------------
-- Unification
--
unify :: Type -> Type -> Subst
unify t1 t2 = error "substBnd: implement me"
-- ---------------------------------------------------------------------
-- Replace variables in the type with the types in the Subst
--
line: no 115: substitute :: Subst -> Type -> Type
substitute [(_ , t2)] tv = tv <- t2
-- ---------------------------------------------------------------------
-- Replace variables in the type annotations of a Bind, Expr, or Alt
--
substBnd :: Subst -> Bind -> Bind
substBnd _ _ = error "substBnd: implement me"
감사합니다.
전체가 실제로 2 ~ 3 칸 들여 쓰여졌습니까? –
최상위 레벨 정의가 들여 쓰기되어서는 안됩니다. 또한'tv <- t2 '는 유효한 구문이 아닙니다. – hammar
대체물의 의도 된 기능은 무엇입니까? 귀하의 의견은 분명하지 않습니다. –