<div dir="ltr">For example empty data declarations, <b>Fst </b>and <b>Snd </b>in the code bellow:<br><br><div class="prettyprint" style="background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; word-wrap: break-word;"><code class="prettyprint"><div class="subprettyprint"><span style="color: #660;" class="styled-by-prettify">{-</span><span style="color: #800;" class="styled-by-prettify"># LANGUAGE TypeOperators #-}</span><span style="color: #000;" class="styled-by-prettify"><br></span><span style="color: #660;" class="styled-by-prettify">{-</span><span style="color: #800;" class="styled-by-prettify"># LANGUAGE TypeFamilies #-}</span><span style="color: #000;" class="styled-by-prettify"><br></span><span style="color: #660;" class="styled-by-prettify">{-</span><span style="color: #800;" class="styled-by-prettify"># LANGUAGE EmptyDataDecls #-}</span><span style="color: #000;" class="styled-by-prettify"><br></span><span style="color: #660;" class="styled-by-prettify">{-</span><span style="color: #800;" class="styled-by-prettify"># LANGUAGE MultiParamTypeClasses #-}</span><span style="color: #000;" class="styled-by-prettify"><br></span><span style="color: #660;" class="styled-by-prettify">{-</span><span style="color: #800;" class="styled-by-prettify"># LANGUAGE FlexibleInstances #-}</span><span style="color: #000;" class="styled-by-prettify"><br><br></span><span style="color: #008;" class="styled-by-prettify">module</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">Main</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #008;" class="styled-by-prettify">where</span><span style="color: #000;" class="styled-by-prettify"><br><br>  data </span><span style="color: #606;" class="styled-by-prettify">Fst</span><span style="color: #000;" class="styled-by-prettify"><br>  data </span><span style="color: #606;" class="styled-by-prettify">Snd</span><span style="color: #000;" class="styled-by-prettify"><br><br>  data F a b </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> F b deriving </span><span style="color: #606;" class="styled-by-prettify">Show</span><span style="color: #000;" class="styled-by-prettify"><br>  data S a b </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> S b deriving </span><span style="color: #606;" class="styled-by-prettify">Show</span><span style="color: #000;" class="styled-by-prettify"><br><br>  </span><span style="color: #008;" class="styled-by-prettify">class</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">TupleVal</span><span style="color: #000;" class="styled-by-prettify"> a </span><span style="color: #008;" class="styled-by-prettify">where</span><span style="color: #000;" class="styled-by-prettify"><br>    val </span><span style="color: #660;" class="styled-by-prettify">::</span><span style="color: #000;" class="styled-by-prettify"> a b </span><span style="color: #660;" class="styled-by-prettify">-></span><span style="color: #000;" class="styled-by-prettify"> b<br><br>  instance a </span><span style="color: #660;" class="styled-by-prettify">~</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">Fst</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">=></span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">TupleVal</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">F a</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #008;" class="styled-by-prettify">where</span><span style="color: #000;" class="styled-by-prettify"><br>    val </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">F v</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> v<br><br>  instance a </span><span style="color: #660;" class="styled-by-prettify">~</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">Fst</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">=></span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">TupleVal</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">S a</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #008;" class="styled-by-prettify">where</span><span style="color: #000;" class="styled-by-prettify"><br>    val </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">S v</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> v<br><br>  </span><span style="color: #008;" class="styled-by-prettify">class</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">TupleOps</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">a </span><span style="color: #660;" class="styled-by-prettify">::</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">*</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">-></span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">*</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">-></span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">*)</span><span style="color: #000;" class="styled-by-prettify"> b c </span><span style="color: #008;" class="styled-by-prettify">where</span><span style="color: #000;" class="styled-by-prettify"><br>    type FST a b c<br>    type SND a b c<br>    tfst </span><span style="color: #660;" class="styled-by-prettify">::</span><span style="color: #000;" class="styled-by-prettify"> a b c </span><span style="color: #660;" class="styled-by-prettify">-></span><span style="color: #000;" class="styled-by-prettify"> FST a b c<br>    tsnd </span><span style="color: #660;" class="styled-by-prettify">::</span><span style="color: #000;" class="styled-by-prettify"> a b c </span><span style="color: #660;" class="styled-by-prettify">-></span><span style="color: #000;" class="styled-by-prettify"> SND a b c<br><br>  instance </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">b </span><span style="color: #660;" class="styled-by-prettify">~</span><span style="color: #000;" class="styled-by-prettify"> F b</span><span style="color: #080;" class="styled-by-prettify">' b'', b'</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">~</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">Fst</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify"> c </span><span style="color: #660;" class="styled-by-prettify">~</span><span style="color: #000;" class="styled-by-prettify"> S c</span><span style="color: #080;" class="styled-by-prettify">' c'', c'</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">~</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">Snd</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">=></span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">TupleOps</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">(,)</span><span style="color: #000;" class="styled-by-prettify"> b c </span><span style="color: #008;" class="styled-by-prettify">where</span><span style="color: #000;" class="styled-by-prettify"><br>    type FST </span><span style="color: #660;" class="styled-by-prettify">(,)</span><span style="color: #000;" class="styled-by-prettify"> b c </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> b<br>    type SND </span><span style="color: #660;" class="styled-by-prettify">(,)</span><span style="color: #000;" class="styled-by-prettify"> b c </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> c<br>    tfst </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> fst<br>    tsnd </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> snd<br><br>  instance </span><span style="color: #606;" class="styled-by-prettify">TupleOps</span><span style="color: #000;" class="styled-by-prettify"> F b </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">c1</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify"> c2</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #008;" class="styled-by-prettify">where</span><span style="color: #000;" class="styled-by-prettify"><br>    type FST F b </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">c1</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify"> c2</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> c1<br>    type SND F b </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">c1</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify"> c2</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> c2<br>    tfst </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">F </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">v1</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify"> v2</span><span style="color: #660;" class="styled-by-prettify">))</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> v1<br>    tsnd </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">F </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">v1</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify"> v2</span><span style="color: #660;" class="styled-by-prettify">))</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> v2<br><br>  instance </span><span style="color: #606;" class="styled-by-prettify">TupleOps</span><span style="color: #000;" class="styled-by-prettify"> S b </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">c1</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify"> c2</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #008;" class="styled-by-prettify">where</span><span style="color: #000;" class="styled-by-prettify"><br>    type FST S b </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">c1</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify"> c2</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> c1<br>    type SND S b </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">c1</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify"> c2</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> c2<br>    tfst </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">S </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">v1</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify"> v2</span><span style="color: #660;" class="styled-by-prettify">))</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> v1<br>    tsnd </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">S </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">v1</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify"> v2</span><span style="color: #660;" class="styled-by-prettify">))</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> v2<br><br>  type </span><span style="color: #606;" class="styled-by-prettify">First</span><span style="color: #000;" class="styled-by-prettify"> a </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> F </span><span style="color: #606;" class="styled-by-prettify">Fst</span><span style="color: #000;" class="styled-by-prettify"> a<br>  type </span><span style="color: #606;" class="styled-by-prettify">Second</span><span style="color: #000;" class="styled-by-prettify"> a </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> S </span><span style="color: #606;" class="styled-by-prettify">Snd</span><span style="color: #000;" class="styled-by-prettify"> a<br><br>  type a </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> b </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #606;" class="styled-by-prettify">First</span><span style="color: #000;" class="styled-by-prettify"> a</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">Second</span><span style="color: #000;" class="styled-by-prettify"> b</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br><br>  type family a </span><span style="color: #660;" class="styled-by-prettify">:=:</span><span style="color: #000;" class="styled-by-prettify"> b </span><span style="color: #008;" class="styled-by-prettify">where</span><span style="color: #000;" class="styled-by-prettify"><br>    </span><span style="color: #606;" class="styled-by-prettify">Fst</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">:=:</span><span style="color: #000;" class="styled-by-prettify"> b </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">Fst</span><span style="color: #080;" class="styled-by-prettify">' b<br>    Snd :=: b = Snd'</span><span style="color: #000;" class="styled-by-prettify"> b<br><br>  infixr </span><span style="color: #066;" class="styled-by-prettify">1</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">:=:</span><span style="color: #000;" class="styled-by-prettify"><br><br>  type family </span><span style="color: #606;" class="styled-by-prettify">Fst</span><span style="color: #080;" class="styled-by-prettify">' a where<br>    Fst'</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">a</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify"> b</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> a<br>    </span><span style="color: #606;" class="styled-by-prettify">Fst</span><span style="color: #080;" class="styled-by-prettify">' (First a) = Fst'</span><span style="color: #000;" class="styled-by-prettify"> a<br>    </span><span style="color: #606;" class="styled-by-prettify">Fst</span><span style="color: #080;" class="styled-by-prettify">' (Second a) = Fst'</span><span style="color: #000;" class="styled-by-prettify"> a<br><br>  type family </span><span style="color: #606;" class="styled-by-prettify">Snd</span><span style="color: #080;" class="styled-by-prettify">' a where<br>    Snd'</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">a</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify"> b</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> b<br>    </span><span style="color: #606;" class="styled-by-prettify">Snd</span><span style="color: #080;" class="styled-by-prettify">' (First a) = Snd'</span><span style="color: #000;" class="styled-by-prettify"> a<br>    </span><span style="color: #606;" class="styled-by-prettify">Snd</span><span style="color: #080;" class="styled-by-prettify">' (Second a) = Snd'</span><span style="color: #000;" class="styled-by-prettify"> a<br><br>  </span><span style="color: #660;" class="styled-by-prettify">(@@)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">::</span><span style="color: #000;" class="styled-by-prettify"> a </span><span style="color: #660;" class="styled-by-prettify">-></span><span style="color: #000;" class="styled-by-prettify"> b </span><span style="color: #660;" class="styled-by-prettify">-></span><span style="color: #000;" class="styled-by-prettify"> a </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> b<br>  a </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> b </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">F a</span><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify"> S b</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br><br>  tpl1 </span><span style="color: #660;" class="styled-by-prettify">::</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">Int</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">String</span><span style="color: #000;" class="styled-by-prettify"><br>  tpl1 </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #066;" class="styled-by-prettify">1</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #080;" class="styled-by-prettify">"hello"</span><span style="color: #000;" class="styled-by-prettify"><br><br>  tpl2 </span><span style="color: #660;" class="styled-by-prettify">::</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">Snd</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">:=:</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">String</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">String</span><span style="color: #000;" class="styled-by-prettify"><br>  tpl2 </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> tsnd </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #080;" class="styled-by-prettify">"hello"</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #080;" class="styled-by-prettify">"world"</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br><br>  tpl3 </span><span style="color: #660;" class="styled-by-prettify">::</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">Snd</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">:=:</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">String</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">String</span><span style="color: #000;" class="styled-by-prettify"><br>  tpl3 </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> tsnd </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #080;" class="styled-by-prettify">"hello"</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #080;" class="styled-by-prettify">"world"</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br><br>  tpl4 </span><span style="color: #660;" class="styled-by-prettify">::</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">Int</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">String</span><span style="color: #000;" class="styled-by-prettify"><br>  tpl4 </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #066;" class="styled-by-prettify">1</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #080;" class="styled-by-prettify">"hello"</span><span style="color: #000;" class="styled-by-prettify"><br><br>  tpl5 </span><span style="color: #660;" class="styled-by-prettify">::</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">Snd</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">:=:</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">String</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #606;" class="styled-by-prettify">String</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">String</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>  tpl5 </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> tsnd </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #080;" class="styled-by-prettify">"hello"</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #080;" class="styled-by-prettify">"hello"</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #080;" class="styled-by-prettify">"world"</span><span style="color: #660;" class="styled-by-prettify">))</span><span style="color: #000;" class="styled-by-prettify"><br><br>  tpl6 </span><span style="color: #660;" class="styled-by-prettify">::</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">Snd</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">:=:</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">Fst</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">:=:</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">Snd</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">:=:</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #606;" class="styled-by-prettify">String</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">String</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">((</span><span style="color: #606;" class="styled-by-prettify">String</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">String</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #606;" class="styled-by-prettify">String</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br>  tpl6 </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> tsnd </span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify"> tfst </span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify"> tsnd $ </span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #080;" class="styled-by-prettify">"world1"</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #080;" class="styled-by-prettify">"hello2"</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">((</span><span style="color: #080;" class="styled-by-prettify">"hello3"</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #080;" class="styled-by-prettify">"world5"</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #660;" class="styled-by-prettify">@@</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #080;" class="styled-by-prettify">"world4"</span><span style="color: #660;" class="styled-by-prettify">)</span><span style="color: #000;" class="styled-by-prettify"><br><br>  main </span><span style="color: #660;" class="styled-by-prettify">::</span><span style="color: #000;" class="styled-by-prettify"> IO </span><span style="color: #660;" class="styled-by-prettify">()</span><span style="color: #000;" class="styled-by-prettify"><br>  main </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> </span><span style="color: #008;" class="styled-by-prettify">do</span><span style="color: #000;" class="styled-by-prettify"><br>    </span><span style="color: #008;" class="styled-by-prettify">print</span><span style="color: #000;" class="styled-by-prettify"> tpl4<br>    </span><span style="color: #008;" class="styled-by-prettify">print</span><span style="color: #000;" class="styled-by-prettify"> tpl3<br>    </span><span style="color: #008;" class="styled-by-prettify">print</span><span style="color: #000;" class="styled-by-prettify"> tpl2<br>    </span><span style="color: #008;" class="styled-by-prettify">print</span><span style="color: #000;" class="styled-by-prettify"> tpl6<br><br></span></div></code></div><br><br><br>пятница, 12 августа 2016 г., 18:16:18 UTC+3 пользователь James Brown написал:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">What's the purpose to a<span style="color:rgb(0,0,0);font-family:Verdana,Arial,"Bitstream Vera Sans",Helvetica,sans-serif;font-size:13px">llow data declarations with no constructors?</span></div><div><br><div class="gmail_quote">On Fri, Aug 12, 2016 at 11:08 AM, Sergey N. Yashin <span dir="ltr"><<a href="javascript:" target="_blank" gdf-obfuscated-mailto="qfPpTDX6DgAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">yashin...@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">For zero data constructors you need to use only <a href="https://prime.haskell.org/wiki/EmptyDataDecls" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fprime.haskell.org%2Fwiki%2FEmptyDataDecls\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGj2wXYYXMyo8sSdKMz9mx19OQIXw';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fprime.haskell.org%2Fwiki%2FEmptyDataDecls\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGj2wXYYXMyo8sSdKMz9mx19OQIXw';return true;">EmptyDataDecls</a> extension.<br></div><br>______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="nofollow" target="_blank" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fhaskell-cafe\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH7sFgl7KfuDcDlaGGG3ip3kRaoIA';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fhaskell-cafe\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH7sFgl7KfuDcDlaGGG3ip3kRaoIA';return true;">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
Only members subscribed via the mailman list are allowed to post.<br></blockquote></div><br></div>
</blockquote></div>