annotate tests/crud.urs @ 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 1fb318c17546
children
rev   line source
adamc@352 1 con colMeta = fn t_formT :: (Type * Type) =>
adamc@352 2 {Nam : string,
adamc@352 3 Show : t_formT.1 -> xbody,
adamc@352 4 Widget : nm :: Name -> xml form [] [nm = t_formT.2],
adamc@352 5 WidgetPopulated : nm :: Name -> t_formT.1
adamc@371 6 -> xml form [] [nm = t_formT.2],
adamc@352 7 Parse : t_formT.2 -> t_formT.1,
adamc@352 8 Inject : sql_injectable t_formT.1}
adamc@346 9 con colsMeta = fn cols :: {(Type * Type)} => $(mapT2T colMeta cols)
adamc@326 10
adamc@362 11 val int : string -> colMeta (int, string)
adamc@362 12 val float : string -> colMeta (float, string)
adamc@362 13 val string : string -> colMeta (string, string)
adamc@362 14 val bool : string -> colMeta (bool, bool)
adamc@362 15
adamc@325 16 functor Make(M : sig
adamc@352 17 con cols :: {(Type * Type)}
adamc@352 18 constraint [Id] ~ cols
adamc@706 19 table tab : ([Id = int] ++ mapT2T fstTT cols)
adamc@325 20
adamc@352 21 val title : string
adamc@325 22
adamc@352 23 val cols : colsMeta cols
adamc@352 24 end) : sig
adamc@352 25 val main : unit -> transaction page
adamc@325 26 end