User loginNavigation |
Those pesky higher-rank types. Or how to type \f x y. (f x, f y)As people might have noticed I've been somewhat interested in how to type
Now you might think HM, as implemented in various languages, does a nice job typing that. Ocaml gives the most readable result as
Or you could go higher rank and type it
But, for various reasons, I want to type it
Since I am lazy and assume everything has been done in literature somewhere, does anyone have a reference with a typing system like that? PS. 'Solved' in Haskell. Courtesy of Sjoerd Visscher, Haskell allows for quantification over type constructors; though I want to avoid explicit quantifcation.
PPS. Gashe noticed that Haskell is unable to recognize that f should sometimes be unificated with 'id = /\a. a'
By marco at 2014-05-19 11:21 | LtU Forum | previous forum topic | next forum topic | other blogs | 11305 reads
|
Browse archives
Active forum topics |
Recent comments
1 week 6 days ago
42 weeks 1 day ago
42 weeks 1 day ago
42 weeks 1 day ago
1 year 12 weeks ago
1 year 16 weeks ago
1 year 18 weeks ago
1 year 18 weeks ago
1 year 20 weeks ago
1 year 25 weeks ago