Mercurial > urweb
annotate tests/caseFfi.ur @ 1909:659d1f4e95bf
make dist: Use fewer wildcards
The remaining ones only work by accident:
http://www.gnu.org/software/automake/manual/html_node/Wildcards.html
and they have some practical problems too (we don?t really want to
distribute include/urweb/config.h or src/config.sml), but this is
enough for now to pass ?make distcheck? as long as we don?t run it
from a separate build directory.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
---
Makefile.am | 6 +++---
src/c/Makefile.am | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
author | Anders Kaseorg <andersk@mit.edu> |
---|---|
date | Fri, 22 Nov 2013 09:36:14 -0500 |
parents | 71bafe66dbe1 |
children |
rev | line source |
---|---|
adamc@185 | 1 extern structure M : sig |
adamc@185 | 2 datatype t = A | B |
adamc@185 | 3 datatype u = C of t | D |
adamc@185 | 4 end |
adamc@185 | 5 |
adamc@185 | 6 val f = fn x => case x of M.A => M.B | M.B => M.A |
adamc@185 | 7 |
adamc@185 | 8 val t2s = fn x => case x of M.A => "A" | M.B => "B" |
adamc@185 | 9 |
adamc@185 | 10 val g = fn x => case x of M.C a => M.C (f a) | M.D => M.C M.A |
adamc@185 | 11 |
adamc@185 | 12 val u2s = fn x => case x of M.C a => t2s a | M.D => "D" |
adamc@185 | 13 |
adamc@185 | 14 val page = fn x => <html><body> |
adamc@185 | 15 {cdata (t2s x)} |
adamc@185 | 16 </body></html> |
adamc@185 | 17 |
adamc@185 | 18 val page2 = fn x => <html><body> |
adamc@185 | 19 {cdata (u2s x)} |
adamc@185 | 20 </body></html> |
adamc@185 | 21 |
adamc@185 | 22 val main : unit -> page = fn () => <html><body> |
adamc@185 | 23 <li><a link={page M.A}>A</a></li> |
adamc@185 | 24 <li><a link={page M.B}>B</a></li> |
adamc@185 | 25 <li><a link={page2 (M.C M.A)}>C A</a></li> |
adamc@185 | 26 <li><a link={page2 (M.C M.B)}>C B</a></li> |
adamc@185 | 27 <li><a link={page2 M.D}>D</a></li> |
adamc@185 | 28 </body></html> |