<div dir="ltr"><div><br><div><p style="margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:14px;line-height:17.92px;margin-top:0px!important">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Ā <code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:11.9px;padding:0.2em 0px;margin:0px;border-radius:3px;background-color:rgba(0,0,0,0.0392157)">=></code>, 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.:</p><div class="highlight highlight-source-haskell" style="margin-bottom:16px;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';font-size:14px;line-height:17.92px;overflow:visible!important"><pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:11.9px;margin-top:0px;margin-bottom:0px;font-stretch:normal;line-height:1.45;padding:16px;border-radius:3px;word-wrap:normal;word-break:normal;background-color:rgb(247,247,247)"><span class="pl-en" style="color:rgb(121,93,163)">(<span class="pl-k" style="color:rgb(167,29,93)">$</span>)</span> :: (<span class="pl-smi" style="box-sizing: border-box;">a</span> <span class="pl-k" style="color:rgb(167,29,93)">-></span> <span class="pl-smi" style="box-sizing: border-box;">b</span>) <span class="pl-k" style="color:rgb(167,29,93)">-></span> <span class="pl-smi" style="box-sizing: border-box;">a</span> <span class="pl-k" style="color:rgb(167,29,93)">-></span> <span class="pl-smi" style="box-sizing: border-box;">b</span>
forall r <span class="pl-k" style="color:rgb(167,29,93)">::</span> <span class="pl-c1" style="color:rgb(0,134,179)">RuntimeRep</span>
<span class="pl-en" style="color:rgb(121,93,163)">a</span> :: *
<span class="pl-en" style="color:rgb(121,93,163)">b</span> :: <span class="pl-k" style="color:rgb(167,29,93)">TYPE</span> <span class="pl-smi" style="box-sizing: border-box;">r</span></pre></div></div></div></div>