comparison src/demo.sml @ 1301:4359e185d3af

Demo improvements
author Adam Chlipala <adam@chlipala.net>
date Thu, 30 Sep 2010 18:29:59 -0400
parents b4480a56cab7
children 4dd5d23bace2
comparison
equal deleted inserted replaced
1300:e3944a8a128a 1301:4359e185d3af
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE. 25 * POSSIBILITY OF SUCH DAMAGE.
26 *) 26 *)
27 27
28 structure Demo :> DEMO = struct 28 structure Demo :> DEMO = struct
29
30 val noEmacs = ref false
29 31
30 fun make' {prefix, dirname, guided} = 32 fun make' {prefix, dirname, guided} =
31 let 33 let
32 val prose = OS.Path.joinDirFile {dir = dirname, 34 val prose = OS.Path.joinDirFile {dir = dirname,
33 file = "prose"} 35 file = "prose"}
331 (print (">>> " ^ cmd ^ "\n"); 333 (print (">>> " ^ cmd ^ "\n");
332 ignore (OS.Process.system cmd)) 334 ignore (OS.Process.system cmd))
333 else 335 else
334 () 336 ()
335 end) 337 end)
338
339 val highlight = fn () => if !noEmacs then () else highlight ()
336 in 340 in
337 if OS.Path.base file = "demo" then 341 if OS.Path.base file = "demo" then
338 () 342 ()
339 else case OS.Path.ext file of 343 else case OS.Path.ext file of
340 SOME "urp" => 344 SOME "urp" =>