<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've heard fixed-point view, open datatypes and some others, but I'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 "two-level types" in their JFP'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't mean much. It really matters how it'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;">> 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;">> newtype Fix f = In (f (Fix f))</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">> 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>