From: Adam Chlipala Date: Sun, 24 Feb 2008 20:13:45 +0000 (+0000) Subject: Suppress unused env var warnings for lib.dtl X-Git-Tag: release_2010-11-19~52 X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/commitdiff_plain/e9256fdc19decc6158d7c781828395e3b512216c Suppress unused env var warnings for lib.dtl --- diff --git a/src/domtool.grm b/src/domtool.grm index 13ee80b..bd2726c 100644 --- a/src/domtool.grm +++ b/src/domtool.grm @@ -79,7 +79,7 @@ open Ast %% -file : docOpt decls expOpt SEMIopt (docOpt, decls, expOpt) +file : docOpt decls expOpt (docOpt, decls, expOpt) decls : ([]) | decl decls (decl :: decls) diff --git a/src/main.sml b/src/main.sml index a0f402d..b2f59b5 100644 --- a/src/main.sml +++ b/src/main.sml @@ -46,7 +46,10 @@ fun check' G fname = 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 @@ -102,7 +105,10 @@ fun check G fname = 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