Skip to content

Commit

Permalink
this should work
Browse files Browse the repository at this point in the history
  • Loading branch information
digama0 committed Sep 23, 2024
1 parent 854cb5b commit 4b8ca01
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/portableML/mosml/MLSYSPortable.sml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,4 @@ fun syncref init =
}
end

fun export (_: string * 'a) = raise Fail "export not supported on mosml"

end (* struct *)
8 changes: 0 additions & 8 deletions src/portableML/poly/MLSYSPortable.sml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,4 @@ fun syncref init =
upd = fn f => Synchronized.change_result v f}
end

fun export (file, x: 'a) = let
val _ = PolyML.shareCommonData x
val body = PolyML.exportSmall x
val ostream = BinIO.openOut file
val () = BinIO.output (ostream, body)
val () = BinIO.closeOut ostream
in () end

end
10 changes: 9 additions & 1 deletion src/tracing/yes/Tracing.sml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@ struct

open TheoryPP

fun export (file, x: 'a) = let
val _ = PolyML.shareCommonData x
val body = PolyML.exportSmall x
val ostream = BinIO.openOut file
val () = BinIO.output (ostream, body)
val () = BinIO.closeOut ostream
in () end

fun trace_theory name
({theory,parents,types,constants,axioms,definitions,theorems,mldeps,...}: struct_info_record) = let
val file = concat[".holobjs/",name,".tr"]
val () = Portable.export(file, (theory,parents,types,constants,axioms,definitions,theorems,mldeps))
val () = export(file, (theory,parents,types,constants,axioms,definitions,theorems,mldeps))
val _ = Unix.execute ("/usr/bin/gzip", ["-f", file])
in () end

Expand Down
3 changes: 2 additions & 1 deletion tools/sequences/kernel
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ src/prekernel
src/thm
(stdknl)src/tracing/no
(expk)src/tracing/no
(trknl)src/tracing/yes
[poly](trknl)src/tracing/yes
[mosml](trknl)src/tracing/no
(otknl)src/tracing/no
src/postkernel
# these three directories are required to even run hol.bare.unquote
Expand Down

0 comments on commit 4b8ca01

Please sign in to comment.