[Haskell-cafe] same function's type accepted in top level, but rejected in where clause

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Mon Jul 8 20:58:06 CEST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/07/13 19:50, Chaddaï Fouché wrote:
> 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.
> 
> 
> 
> _______________________________________________ Haskell-Cafe
> mailing list Haskell-Cafe at haskell.org 
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
Is this just speculation and wishful thinking or has there actually
been discussion about it already? I think it'd be great if it was the
part of the standard but I'm sure there are tens of naysayers ready to
repaint my shed.

- -- 
Mateusz K.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJR2wu9AAoJEM1mucMq2pqXM64P/RGQR+/qItSQumuUCXkagp5V
jMx3UaoJIyjOlcDBAmbHitZH4gTSNKFh3toWH7brb8SPfMpzgl1rGFtCsr4pzvOS
3GzM2giTvw9cs8rGv5f1O7h2hSpaNgU9xVxzpYxRd4g/h3sMEuWji++jJDhDY6mo
SkOmtMGozi4AwhtMrybDjeNhsno82mKPU9SQF8fKz1yj/MMJY9BwWGs6k3OlvxWM
eNqyRfoyQtgRLB2Th1dJqIV30dakmnMSCX9ALnD0Pg8/lQnqj0iJ1O7b1S2iqn/e
UtxTTyOgwNF56K4CnUpt/os//bHyqsQFFQyFBkdZMstcro57Ta7wcXcPqzhuySNQ
GOerfMkVAOApVkXO6t78XLgy1vkc+RXaxY5obICXN+nRu4WuZBLow0HdxlkKffHE
cwXHigU3KkKIeoyvgpI9pEFSUMPJcBvI7SG9MqWIb5sOxuZhFv2KmDSanptL1bA8
yccRb0yN2vfmL3+hLIBKTfn9TWKCpnEaCpwPBCCM9kFvA31D0Rul5EZT5H8IB2/9
t5DGTOXlACgKbr8GODCFdtLQUCXaKYj7N83yQHt9kBC6PfVe9ECOJjnZrfvnA1na
sTPzzxNFWdAmKQBhZBlldwYvLNtIO7UK0H+l01gacKd5KOldS6u1K+5EDT0WuIg5
LPxtoY8kYIJlwUmZgAqZ
=ZaDI
-----END PGP SIGNATURE-----



More information about the Haskell-Cafe mailing list