<div dir="ltr">I am curious about why the data families syntax was chosen to be the way it is. For example a list can be defined as follows:<div><br></div><div>
<p class="gmail-p1"><span class="gmail-s1">data family List a</span></p><p class="gmail-p1"><span class="gmail-s1">data instance List Char = Empty | Cons Char (List Char)</span></p><p class="gmail-p1"><span class="gmail-s1">
</span></p><p class="gmail-p1"><span class="gmail-s1">data instance List () = Count Int</span></p><p class="gmail-p1"><span class="gmail-s1"><br></span></p><p class="gmail-p1">Instead why not define it as:</p><p class="gmail-p1">data List :: * -> *</p><p class="gmail-p1"><span class="gmail-s1">data List Char = Empty | Cons Char (List Char)</span></p><p class="gmail-p1">
</p><p class="gmail-p1"><span class="gmail-s1">data List () = Count Int</span></p><p class="gmail-p1"><span class="gmail-s1"><br></span></p><p class="gmail-p1"><span class="gmail-s1">The latter form looks more intuitive and easy to remember to me since it is very similar to the way value level functions are defined (signature & pattern matching defs). Here we are just defining a type level function instead.</span></p><p class="gmail-p1"><span class="gmail-s1">-harendra</span></p></div></div>