[Haskell-cafe] same function's type accepted in top level, but rejected in where clause
Chaddaï Fouché
chaddai.fouche at gmail.com
Mon Jul 8 20:50:03 CEST 2013
On Fri, Jul 5, 2013 at 11:03 PM, Ömer Sinan Ağacan <omeragacan at gmail.com>wrote:
> There's an implicit quantifier in type of `f`, like this: `f :: forall
> a. a -> ListF a a`. When I add `ScopedTypeVariables` and `forall a.
> ...` in top level definition, it's like all `a`s in scope of top level
> definition are same, except when explicitly defined as `forall a.
> ...`.
>
> Is my intuition correct?
>
Yes it is ! :)
ScopedTypeVariables is a very nice and non problematic extension, it may
even be made part of some future Haskell standard.
--
Jedaï
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130708/1f7df062/attachment.htm>
More information about the Haskell-Cafe
mailing list