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 4467693374f7448b6
parent 44675 402e1a0d93d9
child 44683 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
     1.1 --- a/src/HOL/Tools/Nitpick/nitrox.ML	Wed Jul 13 22:16:19 2011 +0200
     1.2 +++ b/src/HOL/Tools/Nitpick/nitrox.ML	Wed Jul 13 22:16:19 2011 +0200
     1.3 @@ -35,10 +35,13 @@
     1.4      val (file_name, rest) =
     1.5        (parse_keyword "include" |-- $$ "(" |-- parse_file_path --| $$ ")"
     1.6         --| $$ ".") x
     1.7 +    val path = file_name |> Path.explode
     1.8 +    val path =
     1.9 +      path |> not (Path.is_absolute path) ? Path.append (Path.explode "$TPTP")
    1.10    in
    1.11 -    ((), (file_name |> Path.explode |> File.read
    1.12 -                    |> strip_spaces true (K true)
    1.13 -                    |> raw_explode) @ rest)
    1.14 +    ((), (path |> File.read
    1.15 +               |> strip_spaces true (K true)
    1.16 +               |> raw_explode) @ rest)
    1.17    end
    1.18  
    1.19  val parse_fof_or_cnf =