This is already a separate extension: PatternSignatures. However, that extension is deprecated for some reason.
On Tue, Aug 6, 2013 at 2:46 PM, Evan Laforge <qdun...@gmail.com> wrote: > Occasionally I have to explicitly add a type annotation, either for > clarity or to help choose a typeclass instance. Usually top-level > type annotations take care of this, but sometimes it's convenient to > only annotate a certain value, e.g. one argument of a lambda. > > I've noticed that while vanilla haskell is happy to allow me to put > type annotations on variables where they are used (e.g. '\x -> f (x :: > T)'), if I put it on the variable where it is bound (e.g. '\(x :: T) > -> f x'), it wants me to turn on ScopedTypeVariables. > > I think ScopedTypeVariables is a nice extension and I'm sure it comes > from a perfectly respectable family and all, but it feels like > annotations on arguments comes in as a side-effect. > > Would it make sense to split it into a separate extension like > TypesOnArguments so I can more accurately express my deviation from > haskell2010 orthodoxy? Or is there some deeper tie between scoped > type variables and annotations on arguments? > > Now that I think of it, it seems inconsistent that 'x :: A -> B; x a = > ...' is valid, but 'x = \(a :: A) -> (...) :: B' is not. Doesn't the > former desugar to the latter? > > And what about getting ScopedTypeVariables into haskell prime? As far > as I know everyone loves it, or at least no one actually hates it :) > > _______________________________________________ > Haskell-Cafe mailing list > haskell-c...@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe >
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users