Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
6a96bac9
Commit
6a96bac9
authored
Jul 10, 2007
by
Pietro Abate
Browse files
[r2003-05-14 20:53:20 by cvscast] Empty log message
Original author: cvscast Date: 2003-05-14 20:54:10+00:00
parent
b9c0f758
Changes
2
Hide whitespace changes
Inline
Side-by-side
web/index.xml
View file @
6a96bac9
...
...
@@ -23,21 +23,6 @@
<include
file=
"tutorial.xml"
/>
<include
file=
"sitemap.xml"
/>
<!--
<box>
<ul>
<li><a href="plan.php">Site map</a></li>
<li><a href="/cgi-bin/cduce">Online demo</a></li>
<li><a href="papers.php">Papers and talks</a></li>
<li><a href="team.php">CDuce team</a></li>
<li><a href="bench.php">Benchmarks</a></li>
<li><a href="examples.php">Examples</a></li>
<li><a href="memento.php">Memento</a></li>
<li><a href="tutorial.php">Tutorial</a></li>
</ul>
</box>
-->
<left>
<p>
CDuce ("seduce") is a new typed functional language with
...
...
@@ -59,7 +44,7 @@ XML types play a central role in CDuce.
<left>
<p>
All pages of this site were automatically generated from an XML description of
the content by
<a
href=
"examples.
php
#site"
>
the following CDuce program
</a>
.
the content by
<a
href=
"examples.
html
#site"
>
the following CDuce program
</a>
.
</p><p>
<img
src=
"img/cducepower2.jpg"
alt=
"Powered by CDuce"
/></p>
</left>
...
...
@@ -73,17 +58,17 @@ href="http://www.di.ens.fr/~castagna/EQUIPE"><b>Languages</b></a>
group of ENS in Paris and the
<a
href=
"http://www.lri.fr/bd"
><b>
Databases
</b></a>
group of LRI in
Orsay, two
<a
href=
"http://www.cnrs.fr"
>
CNRS
</a>
labs.
See also the
<
a
href=
"team
.php
"
>
CDuce team
</
a
>
page,
our
<
a
href=
"papers
.php
"
>
technical papers
</
a
>
.
See also the
<
local
href=
"team"
>
CDuce team
</
local
>
page,
our
<
local
href=
"papers"
>
technical papers
</
local
>
.
</p>
<section
title=
"Online running prototype"
>
<p>
The only available implementation of CDuce is an
<a
href=
"cgi-bin/cduce"
>
online prototype
</a>
. To get a feeling of CDuce,
you can try the examples and play with them, or have a look at this
<
a
href=
"memento
.php
"
>
memento
</
a
>
which briefly explains the syntax of
the language. We also have some
<
a
href=
"examples
.php
"
>
larger
examples
</
a
>
.
</p>
you can try the examples and play with them, or have a look at this
<
local
href=
"memento"
>
memento
</
local
>
which briefly explains the syntax of
the language. We also have some
<
local
href=
"examples"
>
larger
examples
</
local
>
.
</p>
<p>
We are planning to distribute a first public release in the next
few weeks.
</p>
...
...
@@ -132,7 +117,7 @@ Some of CDuce peculiar features:
</ul>
<p>
<
a
href=
"bench
.php
"
>
Preliminary benchmarks
</
a
>
suggest that despite the
<
local
href=
"bench"
>
Preliminary benchmarks
</
local
>
suggest that despite the
overhead for static type verification, a CDuce
program can run faster (30% to 60%) than an equivalent XSLT
style-sheet (we performed benchmarks with
...
...
@@ -162,7 +147,7 @@ our research projects include:
</ul>
<p>
We wrote several
<
a
href=
"papers
.php
"
>
technical papers
</
a
>
about
We wrote several
<
local
href=
"papers"
>
technical papers
</
local
>
about
the language design and its theoretical foundations.
</p>
</box>
...
...
@@ -241,7 +226,7 @@ title="XML: Some hyperlinks minus the hype"> By Philip Wadler. </link>
</p>
<p>
<a
href=
"mailto:Alain.Frisch@ens.fr"
>
Webmaster
</a>
-
<
a
href=
"
plan.ph
p"
>
Site map
</
a
>
<
local
href=
"
sitema
p"
>
Site map
</
local
>
</p>
</meta>
...
...
web/site.cd
View file @
6a96bac9
...
...
@@ -47,7 +47,7 @@ type InlineText =
Char
|
<
(`
b
|`
i
|`
tt
|`
em
)
{||}
>
[InlineText*]
|
<code>
String
|
<local
href=
String
>
[]
|
<local
href=
String
>
String
| Xa | Ximg | Xbr ;;
...
...
@@ -123,17 +123,20 @@ let fun authors ([Author+] -> String)
| [
<author>
a1
<author>
a2 ] -> a1 @ ", and " @ a2
| [
<author>
a; rem ] -> a @ ", " @ authors rem;;
let fun find_local_link (sitemap : [Tree*], l : String) :
Inlin
e =
let fun find_local_link (sitemap : [Tree*], l : String) :
Tre
e =
match sitemap with
| (h,t) ->
if (h . name = l) then
<a
href=
(h
.
url
)
>
(h . title)
if (h . name = l) then
h
else
(try find_local_link (t,l) with `Not_found ->
find_local_link (h . children,l))
| [] -> raise `Not_found;;
let fun local_link (sitemap : Tree, l : String) : Inline =
try find_local_link ([sitemap],l)
let fun local_link (sitemap : Tree, l : String, txt : String) : Inline =
try
let h = find_local_link ([sitemap],l) in
let txt = if txt = "" then h . title else txt in
<a
href=
(h
.
url
)
>
txt
with `Not_found -> raise [ 'Local link not found: ' !l ];;
let fun compute_sitemap ((Page|External) -> Tree)
...
...
@@ -157,7 +160,7 @@ match page with
let fun text (t : [InlineText*]) : Inlines =
map t with
|
<code>
x ->
<b>
[
<tt>
(highlight x) ]
|
<local
href=
l
>
[]
-> local_link (sitemap,l)
|
<local
href=
l
>
txt
-> local_link (sitemap,l
,txt
)
|
<
(
tag
&
(`
b
|`
i
|`
tt
|`
em
))
>
x ->
<
(
tag
)
>
(text x)
| z -> z
in
...
...
@@ -201,7 +204,7 @@ match page with
|
<local-links
href=
s
>
[] ->
(match (split_comma s) with
| [] -> []
| l -> let l = map l with x ->
<li>
[ (local_link(sitemap,x)) ]
| l -> let l = map l with x ->
<li>
[ (local_link(sitemap,x
,""
)) ]
in [
<ul>
l ])
| t -> text [ t ]
in
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment