<div class="markdown-here-wrapper" id="markdown-here-wrapper-725018" style><p style="margin:1.2em 0px!important">In addition to the comments made by Daniel, as a general rule, you don’t want a sum type with selectors functions as your example stands, because you can end up with compiling programs like this:</p>

<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code class="language-haskell" style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;background-color:rgb(248,248,248);white-space:pre;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important;display:block;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,255)"><span class="module"><span class="keyword" style="color:rgb(51,51,51);font-weight:bold">module</span> Main <span class="keyword" style="color:rgb(51,51,51);font-weight:bold">where</span></span>

<span class="title" style="color:rgb(153,0,0);font-weight:bold">main</span> :: <span class="type">IO</span> ()
<span class="title" style="color:rgb(153,0,0);font-weight:bold">main</span> = 
    <span class="keyword" style="color:rgb(51,51,51);font-weight:bold">let</span> p = <span class="type">Child</span> <span class="number" style="color:rgb(0,153,153)">10</span> 
        age = adultAge p
     <span class="keyword" style="color:rgb(51,51,51);font-weight:bold">in</span> print age
</code></pre>
<p style="margin:1.2em 0px!important">this craps out with an error at runtime.</p>
</div>