From ddac92a3d792b7e7342e4003862cd5ff5c1f0ab8 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 3 May 2009 12:49:47 -0400 Subject: upload demo --- demo/prose | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'demo/prose') diff --git a/demo/prose b/demo/prose index 4eb5fe93..2d4f5ea3 100644 --- a/demo/prose +++ b/demo/prose @@ -74,6 +74,12 @@ css.urp

Ur/Web supports a structured approach to Cascading Style Sheets, where each style is a first-class value within a module. This demo shows the importing of an external style sheet with one style. By default, like other Ur/Web entities, the name of the style would be Css_quote. We use the rewrite directive in the .urp file to specify an alternate name for a particular canonical module path. The external style sheet contains a definition of a style with the alternate name that we give.

+upload.urp + +

HTTP file upload is made convenient, via the abstract types blob and file in the standard library. A blob is a binary sequence, and a file combines a blob with MIME type information. An upload form input can be used to accept files from the user.

+ +

In the .urp file for this example, we give a whitelist of MIME types to be accepted. The application will echo back to the user any file he uploads as one of those types. You can try submitting other kinds of files to verify that they are rejected.

+ listShop.urp

This example shows off algebraic datatypes, parametric polymorphism, and functors.

-- cgit v1.2.3