arbitrary rank polymorphism and ghc language pragmas

5 Jul
2012
5 Jul
'12
11:18 a.m.
Hi All: I've been working through some details in these papers [1], [2] and noticed a language pragma configuration that I hope you can confirm. When using explicit foralls in a data constructor, it appears that GHC 7.4.2 requires Rank2Types in the Language pragma for what the papers consider rank 1 types. Here's an example: data T = TC (forall a b. a -> b -> a) Am I correct, or is there another extension? The ExplicitForAll does not appear to support rank 1 types in data constructors. 1. Practical Type Inference for Arbitrary-Rank Types. 2. A Direct Algorithm for Type Inference in the Rank 2 Fragment of the Second-Order Lambda Calculus. -- Rick
4701
Age (days ago)
4701
Last active (days ago)
0 comments
1 participants
participants (1)
-
rickmurphy