Niklas Broberg" <niklas.brob...@gmail.com> released a new version of haskell-src-exts --- Thank you Niklas! --- and listed as one of the ``missing features'': > > - Support for (un-parenthesised) higher-ranked types as arguments. > haskell-src-exts supports e.g. foo :: b -> (forall a . [a]) -> b > but not foo :: b -> forall a . [a] -> b. Supporting the latter is > simply a parser issue, but a rather tricky one.
I would not think that this pair of parentheses can be ommitted without changing the meaning; I would parse b -> forall a . [a] -> b as b -> forall a . ([a] -> b) (I am also not sure whether Niklas meant to assert that those two types were equal, so this is just in case...) Perhaps it helps as motivation to consider that from a dependent-type point-of-view, the function type constructor is a special case of the dependent product type construction, | a -> b = Pi _t :: a . b |, where the bound variable, _t, does not occur in b. That brings the function types into the same kind of syntactic mechanism as forall-types, and: b -> forall a . [a] -> b = Pi _t :: b . forall a . Pi _u :: [a] . b /= Pi _t : b . Pi _v : (forall a . [a]) . b = b -> (forall a . [a]) -> b Wolfram _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell