HCoop
/
hcoop
/
domtool2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reduction
[hcoop/domtool2.git]
/
src
/
main.sml
diff --git
a/src/main.sml
b/src/main.sml
index
8cf8e67
..
7f7d2c0
100644
(file)
--- a/
src/main.sml
+++ b/
src/main.sml
@@
-20,7
+20,7
@@
structure Main :> MAIN = struct
structure Main :> MAIN = struct
-open Ast
+open Ast
Print
val dmy = ErrorMsg.dummyLoc
val dmy = ErrorMsg.dummyLoc
@@
-37,9
+37,22
@@
fun check fname =
()
else
let
()
else
let
- val G' = Tycheck.checkFile
Tycheck
.empty tInit prog
+ val G' = Tycheck.checkFile
Env
.empty tInit prog
in
in
- ()
+ if !ErrorMsg.anyErrors then
+ ()
+ else
+ case prog of
+ (_, SOME body) =>
+ let
+ val body' = Reduce.reduceExp G' body
+ in
+ printd (PD.hovBox (PD.PPS.Rel 0,
+ [PD.string "Result:",
+ PD.space 1,
+ p_exp body']))
+ end
+ | _ => ()
end
end
end
end