예를 들어, ParsecT에는 정의에 여러 유형 변수가 있습니다.haskell에서 여러 유형 변수의 순서 규칙은 무엇입니까?
newtype ParsecT s u m a
= ParsecT {unParser :: forall b .
State s u
-> (a -> State s u -> ParseError -> m b)
-> (ParseError -> m b)
-> (a -> State s u -> ParseError -> m b)
-> (ParseError -> m b)
-> m b
}
우리는 이렇게 할 수 있습니까?
newtype ParsecT m a s u -- Only the order of s u m a is changed to m a s u.
= ParsecT {unParser :: forall b .
State s u
-> (a -> State s u -> ParseError -> m b)
-> (ParseError -> m b)
-> (a -> State s u -> ParseError -> m b)
-> (ParseError -> m b)
-> m b
}
newtype을 정의 할 때 유형 변수의 순서에 관한 규칙이나 원칙이 있는지 궁금합니다.
비슷한 수준의 질문은 여기에 있습니다 : http://stackoverflow.com/questions/5863128/ordering-of-parameters-to-make-use-of-currying – cheecheeo