Paweł Wieczorek avatar Paweł Wieczorek committed 25b5cf3

tagged

Comments (0)

Files changed (3)

 SOURCE_DIRS=\
 	-Is src\
 
-
 DEMO_DIRS=\
 	-Is demo\
 
     let app_priority = psp_max_priority - 50
 
     let prio_expr = function
-        | Binop _
         | Var _ -> psp_max_priority
         | App _ -> app_priority
         | Abs _ -> app_priority - 1
+        | Binop _ -> app_priority - 1
         | Let _ -> app_priority - 1
 
 
         ; mk_pair
             "fun x -> (f g)"
             (Abs("x", App(expr_f, expr_g)))
+
+        ; mk_pair
+            "(fun x -> x) (let x = f in g)"
+            (App(expr_abs_x_x, expr_let_x_f_g))
+
+        ; mk_pair
+            "(let x = f in g) (let x = f in g)"
+            (App(expr_let_x_f_g, expr_let_x_f_g))
+
+        ; mk_pair
+            "h (let x = f in g)"
+            (App(expr_h, expr_let_x_f_g))
+
+        ; mk_pair
+            "h (fun x -> x)"
+            (App(expr_h, expr_abs_x_x))
         ]
 
     
 end
 
 
-let _ = print_endline "ArithmeticExpressions"
+let _ = print_endline "ArithmeticExpressions"; print_newline ()
 
 let _ = ArithmeticExpressions.test ()
 
-let _ = print_endline "Lambda"
+let _ = print_endline "Lambda"; print_newline ()
 
 let _ = Lambda.test ()
-OCAMLBUILD= ocamlbuild 
+OCAMLC=ocamlc
 
-DEMO=Demo.native
+DEMO=Demo.byte
 
 .PHONY : ${DEMO}
 
 all: ${DEMO}
 
-${DEMO}: ${LIBS}
-	${OCAMLBUILD} -use-ocamlfind ${DEMO_DIRS} ${DEMO}
+${DEMO}: Demo.ml
+	${OCAMLC} -I ../_build/src -o ${DEMO} StringPainter.cma Demo.ml
 
 clean:
-	${OCAMLBUILD} ${DEMO_DIRS} ${SOURCE_DIRS} ${DEMO} -clean
-
+	rm -f ${DEMO} Demo.cmo Demo.cmi 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.