* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*)
+ *)
(* Main interface *)
dmy)
fun check fname =
+ let
+ val prog = Parse.parse fname
+ in
+ if !ErrorMsg.anyErrors then
+ ()
+ else
+ let
+ val G' = Tycheck.checkFile Env.empty tInit prog
+ in
+ ()
+ end
+ end
+
+fun reduce fname =
let
val prog = Parse.parse fname
in
end
end
+fun eval fname =
+ let
+ val prog = Parse.parse fname
+ in
+ if !ErrorMsg.anyErrors then
+ ()
+ else
+ let
+ val G' = Tycheck.checkFile Env.empty tInit prog
+ in
+ if !ErrorMsg.anyErrors then
+ ()
+ else
+ case prog of
+ (_, SOME body) => Eval.exec StringMap.empty body
+ | _ => ()
+ end
+ end
+
end