
7 Feb
2016
7 Feb
'16
6:08 a.m.
Hi, friends! I want to share my own feelings about type signatures. It is always hard for me to read type signatures with class constraints, because first I need to spot that there is =>, then I have to split type signature in my mind to constraint part and actual signature part. I think having constraints before signature when defining things is something that eases source parsing and etc., but wouldn't type signatures become a bit more readable if we put constraints after actual signature when printing it in GHCi (and maybe in Haddock), e.g.: ($) :: (a -> b) -> a -> b forall r :: RuntimeRep a :: * b :: TYPE r