뒷다리 밀러에서 표현할 수없는 시스템 -F의 일부 유형 및 / 또는 용어는 무엇입니까?
-
14-11-2019 - |
문제
나는 힌두리 밀너가 System-F에 대한 제한 이었다는 것을 어딘가에서 읽는 것을 기억합니다.그렇다면 시스템 -F에서 입력 할 수있는 용어로 누군가를 제공 할 수 있습니다.
해결책
Anything involving higher-ranked (i.e. "first-class") polymorphism. For example:
lambda f : (forall A. A -> A). (f Int 1, f String "hello")
This function would have the type (forall A. A -> A) -> Int * String
, which is not expressible in HM, where all polymorphic type schemes must be in "prenex" form (i.e. the quantifier may only occur on the outside, never nested).
제휴하지 않습니다 StackOverflow