annotate tests/disjoint.ur @ 1739:c414850f206f
Add support for -boot flag, which allows in-tree execution of Ur/Web
The boot flag rewrites most hardcoded paths to point to the build
directory, and also forces static compilation. This is convenient
for developing Ur/Web, or if you cannot 'sudo make install' Ur/Web.
The following changes were made:
* Header files were moved to include/urweb instead of include;
this lets FFI users point their C_INCLUDE_PATH at this directory
at write <urweb/urweb.h>. For internal Ur/Web executables,
we simply pass -I$PATH/include/urweb as normal.
* Differentiate between LIB and SRCLIB; SRCLIB is Ur and JavaScript
source files, while LIB is compiled products from libtool. For
in-tree compilation these live in different places.
* No longer reference Config for paths; instead use Settings; these
settings can be changed dynamically by Compiler.enableBoot ()
(TODO: add a disableBoot function.)
* config.h is now generated directly in include/urweb/config.h,
for consistency's sake (especially since it gets installed
along with the rest of the headers!)
* All of the autotools build products got updated.
* The linkStatic field in protocols now only contains the name of the
build product, and not the absolute path.
Future users have to be careful not to reference the Settings files
to early, lest they get an old version (this was the source of two
bugs during development of this patch.)
author |
Edward Z. Yang <ezyang@mit.edu> |
date |
Wed, 02 May 2012 17:17:57 -0400 |
parents |
71bafe66dbe1 |
children |
|
rev |
line source |
adamc@86
|
1 con c1 = fn x :: Name => [x] ~ [A] => [x = int, A = string]
|
adamc@84
|
2 con c2 = fn x :: Name => [x] ~ [A] => [A, x]
|
adamc@84
|
3 con c3 = fn x :: Name => [A] ~ [x] => [x, A]
|
adamc@84
|
4 con c4 = fn x :: Name => [A] ~ [x] => [A, x]
|
adamc@84
|
5
|
adamc@84
|
6 con c5 = fn r1 :: {Type} => fn r2 => r1 ~ r2 => r1 ++ r2
|
adamc@84
|
7 con c6 = fn r1 :: {Type} => fn r2 => r2 ~ r1 => r1 ++ r2
|
adamc@84
|
8
|
adamc@86
|
9 con c7 = fn x :: Name => fn r => [x] ~ r => [x = int] ++ r
|
adamc@86
|
10
|
adamc@86
|
11 val vt1 = fn x : $(c1 #B) => x.B
|
adamc@86
|
12 val vt2 = fn x : $(c1 #B) => x.A
|
adamc@86
|
13 val vt3 = fn x : $(c1 #C) => x.A
|
adamc@86
|
14 val vt4 = fn x : $(c1 #C) => x.A
|
adamc@86
|
15 (*
|
adamc@86
|
16 val vtX = fn x : $(c1 #A) => x.A
|
adamc@86
|
17 val vtX = fn x : $(c1 #A) => x.A
|
adamc@86
|
18 *)
|
adamc@85
|
19
|
adamc@85
|
20 val v1 = fn x :: Name => fn [x] ~ [A] => fn y : {x : int, A : string} => y.x
|
adamc@86
|
21
|
adamc@86
|
22 val vt5 = v1 [#B] {A = "Hi", B = 0}
|
adamc@86
|
23 (*
|
adamc@86
|
24 val vtX = v1 [#A] {A = "Hi", A = 0}
|
adamc@86
|
25 *)
|
adamc@86
|
26
|
adamc@86
|
27 val v2 = fn x :: Name => fn r :: {Type} => fn y : $(c7 x r) => fn [x] ~ r => y.x
|
adamc@86
|
28 val vt6 = v2 [#A] [[B = float, C = string]] {A = 8, B = 8.0, C = "8"}
|
adamc@86
|
29
|
adamc@86
|
30 (*
|
adamc@86
|
31 val vtX = v2 [#A] [[B = float, B = string]] {A = 8, B = 8.0, B = "8"}
|
adamc@86
|
32 val vtX = v2 [#A] [[A = float, B = string]] {A = 8, A = 8.0, B = "8"}
|
adamc@86
|
33 *)
|
adamc@87
|
34
|
adamc@87
|
35 val main = vt6
|