[ghc-steering-committee] #179: Tweak the printing of foralls, recommendation: accept

Iavor Diatchki iavor.diatchki at gmail.com
Thu Mar 14 22:18:48 UTC 2019


Overall I am all for simplifying this stuff, but the bit where constraints
with no variables are not simplified seems quite confusing.   More
concretely, using the example from the proposal:

bar :: forall a b. (a ~ Int) => a -> b -> a

Is it the case that `:t bar @Bool` will print

bar :: (Bool ~ Int) => Bool -> b -> Bool

This looks particularly confusing without the explicit `forall`, although
it seems questionable either way.

-Iavor



On Thu, Mar 14, 2019 at 7:47 AM Joachim Breitner <mail at joachim-breitner.de>
wrote:

> Dear Committee,
>
> Richard, in collarboration with Simon PJ, proposes some tweaks to how
> foralls are printed by GHC.
>
> In particular, whenever a type variable is printed with an forall, it
> is printed with {a} unless it is a specified variable. And there are
> tweaks to what :type does with its argument that makes it more useful,
> and obviates the need for a separate :type +v.
>
> https://github.com/goldfirere/ghc-proposals/blob/printing-foralls/proposals/0000-printing-foralls.rst
>
> I like that it actually simplifies the UI (by removing :type +v), so I
> recommend acceptance.
>
> Cheers,
> Joachim
> --
> Joachim Breitner
>   mail at joachim-breitner.de
>   http://www.joachim-breitner.de/
>
> -----BEGIN PGP SIGNATURE-----
>
> iQIzBAABCAAdFiEEGkYIf5Vdk8V8YFcbPZCKs/D79R8FAlyKaX8ACgkQPZCKs/D7
> 9R/7oxAAgU213SuV+1lr/JExnMSPNWD6s7CPTWdauLK+tHYUv1MD3HeZlBZb2pvN
> R/swC6jdm95vKXWeMVhfYGFGepOdMEKzqBWLDf3fCO29MlHlb4barwtEZOZ9AbaM
> DSyE+RjVQ35ATZPvfFTYdBacBrvCivoRWcUdi10ps6rizI86gKeCiG1PN5nVMNV+
> cpvTpFWRm/xmbtU4xFWuZ9FjL0bfO6yJCueX07gTkdZYW4vnvWSdis6CInkQZ7SA
> hXbTEYNT9zMCGvJMG+NQN+5c0h3GJlUoTsNGd0PsQnkvoYiLjM52eM5hzkz5zFRr
> mMYT381T1nnIl505IFGuT/je5KAn7wTImIXvvclwDxfjCBn3J1IRVAbikgwlTU4M
> 9L+tlQiTKI8OZpbgpPjjRj4hWrnX1gzWiIGwtPYtQuPhkDhEvq0xex8qEKpd7waE
> r5klTYyZrC0LGaHyX5G5yunGLWqnlLKOHAPI20Z1bxVPtDJZ/4g6AoCYSNqBLsHt
> fMTFflHdKTlsCOETPGhaxgf6PP0WvZtNdgTrB2rL5jzKJSOKc1rVRFAdYIr5PP3H
> c4aZGce/ChyFazHeF7hH5UZ7yyB0gMc3T+do6I8vySp0YGeRweb36FU13CduMS05
> rvzb6GIkNFz/Fx2MascE9kZtGvDT9BlxGXqJ9rL/huXquIwN6Gg=
> =1qbg
> -----END PGP SIGNATURE-----
> _______________________________________________
> ghc-steering-committee mailing list
> ghc-steering-committee at haskell.org
> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20190314/44ced9f9/attachment.html>


More information about the ghc-steering-committee mailing list