<div dir="ltr"><div><br></div>Answering my own question, which means I did not do enough research before asking. I found two points that I missed earlier:<div><br></div><div>1) data families are open in contrast to value level functions i.e. you can add more instances later on hence the family and instance keywords make sense.</div><div><br></div><div>2) the syntax 'data family List :: * -> *' is actually already supported as an alternative.</div><div><br></div><div>-harendra</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On 13 November 2016 at 16:10, Harendra Kumar <span dir="ltr"><<a href="mailto:harendra.kumar@gmail.com" target="_blank">harendra.kumar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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="m_-6748799162656050712gmail-p1"><span class="m_-6748799162656050712gmail-s1">data family List a</span></p><p class="m_-6748799162656050712gmail-p1"><span class="m_-6748799162656050712gmail-s1">data instance List Char = Empty | Cons Char (List Char)</span></p><p class="m_-6748799162656050712gmail-p1"><span class="m_-6748799162656050712gmail-s1">
</span></p><p class="m_-6748799162656050712gmail-p1"><span class="m_-6748799162656050712gmail-s1">data instance List () = Count Int</span></p><p class="m_-6748799162656050712gmail-p1"><span class="m_-6748799162656050712gmail-s1"><br></span></p><p class="m_-6748799162656050712gmail-p1">Instead why not define it as:</p><p class="m_-6748799162656050712gmail-p1">data List :: * -> *</p><p class="m_-6748799162656050712gmail-p1"><span class="m_-6748799162656050712gmail-s1">data List Char = Empty | Cons Char (List Char)</span></p><p class="m_-6748799162656050712gmail-p1">
</p><p class="m_-6748799162656050712gmail-p1"><span class="m_-6748799162656050712gmail-s1">data List () = Count Int</span></p><p class="m_-6748799162656050712gmail-p1"><span class="m_-6748799162656050712gmail-s1"><br></span></p><p class="m_-6748799162656050712gmail-p1"><span class="m_-6748799162656050712gmail-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><span class="HOEnZb"><font color="#888888"><p class="m_-6748799162656050712gmail-p1"><span class="m_-6748799162656050712gmail-s1">-harendra</span></p></font></span></div></div>
</blockquote></div><br></div></div></div>