Abstracting over constraints: Can this be implemented in GHC?

Alexander Berntsen alexander at plaimi.net
Mon Nov 10 09:57:54 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 07/11/14 16:36, Richard Eisenberg wrote:
> or an explicit type application, once those are available
Speaking of. Who's working on those? How are they progressing?

While this is a nightmare:
(f :: (Show x, Show y) => (forall a. Show a => a -> d) -> (x, y) ->
(d, d)) show (1.2, False)

Something like this would be acceptable:
(f @ Show) show (1,2, False)


But it's still the Wrong Thing, in my opinion.
- -- 
Alexander
alexander at plaimi.net
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iF4EAREIAAYFAlRgjCIACgkQRtClrXBQc7V+XQEApisF6PVFxa6j884A5pceaEX/
drUUvzh2SLPN5BC9lJoBAI4h9JdOvg0d33vKo9JU65O+44jD7C5RabU1vXRV218J
=RgSL
-----END PGP SIGNATURE-----


More information about the ghc-devs mailing list