<div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;ve heard fixed-point view, open datatypes and some others, but I&#39;m curious where this pattern comes up in literature and what it is called there.<br>
</blockquote>
<br></div>
Tim Sheard and Emir Pasalic call this technique &quot;two-level types&quot; in their JFP&#39;04 paper Two-Level Types and Parameterized Modules:<br>
<br>
    <a href="http://homepage.mac.com/pasalic/p2/papers/JfpPearl.pdf" target="_blank">http://homepage.mac.com/pasalic/p2/papers/JfpPearl.pdf</a><br>
</blockquote><div><br>Apparently from reading Section 2 of that paper, they would call ExprF non-recursive type the structure operator. I think, by itself, the type ExprF doesn&#39;t mean much. It really matters how it&#39;s used to determine what you call it.<br>

<br>Martijn already mentioned the fixed-point view, but that only makes since in the context of something like Fix:<br><br><span style="font-family: courier new,monospace;">&gt; data ExprF r  = Add r r | Sub r r | Mul r r | Div r r | Num Int</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">&gt; newtype Fix f = In (f (Fix f))</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&gt; type Expr     = Fix ExprF</span><br>

<br>I believe the F suffix that Martijn used typically means functor, and I sometimes call types like this functors (with an optional but obvious instance of Functor).<br><br>Regards,<br>Sean<br></div></div>