honor the TPTP environment variable as the root of include relative paths -- that's a weird convention but without it Nitrox will fail at CASC
authorblanchet
Wed, 13 Jul 2011 22:16:19 +0200
changeset 43812 93374f7448b6
parent 43811 402e1a0d93d9
child 43819 89082fd9e32d
honor the TPTP environment variable as the root of include relative paths -- that's a weird convention but without it Nitrox will fail at CASC
src/HOL/Tools/Nitpick/nitrox.ML
--- a/src/HOL/Tools/Nitpick/nitrox.ML	Wed Jul 13 22:16:19 2011 +0200
+++ b/src/HOL/Tools/Nitpick/nitrox.ML	Wed Jul 13 22:16:19 2011 +0200
@@ -35,10 +35,13 @@
     val (file_name, rest) =
       (parse_keyword "include" |-- $$ "(" |-- parse_file_path --| $$ ")"
        --| $$ ".") x
+    val path = file_name |> Path.explode
+    val path =
+      path |> not (Path.is_absolute path) ? Path.append (Path.explode "$TPTP")
   in
-    ((), (file_name |> Path.explode |> File.read
-                    |> strip_spaces true (K true)
-                    |> raw_explode) @ rest)
+    ((), (path |> File.read
+               |> strip_spaces true (K true)
+               |> raw_explode) @ rest)
   end
 
 val parse_fof_or_cnf =