aboutsummaryrefslogtreecommitdiffhomepage
path: root/demo/prose
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-03 14:57:33 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-03 14:57:33 -0400
commite1618fb012b5926889d80893c9ac4ce08838519d (patch)
tree46b157b5c6fb6967e1ab4809f94a6d6505de7411 /demo/prose
parentddac92a3d792b7e7342e4003862cd5ff5c1f0ab8 (diff)
outer demo
Diffstat (limited to 'demo/prose')
-rw-r--r--demo/prose4
1 files changed, 4 insertions, 0 deletions
diff --git a/demo/prose b/demo/prose
index 2d4f5ea3..2cfbb291 100644
--- a/demo/prose
+++ b/demo/prose
@@ -135,6 +135,10 @@ constraints.urp
<li>The <tt>FOREIGN KEY</tt> constraint declares that a row of the table references a particular column of another table, or of the same table, as we see in this example. It's a static type error to reference a foreign key column that has no <tt>PRIMARY KEY</tt> or <tt>UNIQUE</tt> constraint.</li>
</ol>
+outer.urp
+
+<p>SQL outer joins are no problem, as this demo shows. Unlike with SQL, here we have static type inference determining for us which columns may become nullable as a result of an outer join, and the compiler will reject programs that make the wrong assumptions about that process. The details of that nullification don't appear in this example, where the magic of type classes determines both the post-join type of each field and the right pretty-printing and parsing function for each of those types.</p>
+
sum.urp
<p>Metaprogramming is one of the most important facilities of Ur. This example shows how to write a function that is able to sum up the fields of records of integers, no matter which set of fields the particular record has.</p>