Suppress unused env var warnings for lib.dtl
[hcoop/domtool2.git] / src / main.sml
index a0f402d..b2f59b5 100644 (file)
@@ -46,7 +46,10 @@ fun check' G fname =
        if !ErrorMsg.anyErrors then
            G
        else
        if !ErrorMsg.anyErrors then
            G
        else
-           (Option.app (Unused.check G) (#3 prog);
+           (if isLib fname then
+                ()
+            else
+                Option.app (Unused.check G) (#3 prog);
             Tycheck.checkFile G (Defaults.tInit prog) prog)
     end
 
             Tycheck.checkFile G (Defaults.tInit prog) prog)
     end
 
@@ -102,7 +105,10 @@ fun check G fname =
                        if !ErrorMsg.anyErrors then
                            raise ErrorMsg.Error
                        else
                        if !ErrorMsg.anyErrors then
                            raise ErrorMsg.Error
                        else
-                           (Option.app (Unused.check G) (#3 prog);
+                           (if isLib fname then
+                                ()
+                            else
+                                Option.app (Unused.check G) (#3 prog);
                             (G', #3 prog))
                    end
            end
                             (G', #3 prog))
                    end
            end