add function in imperative shell to save export string, and fix errors in generating export string from functional core

This commit is contained in:
2025-07-12 19:34:52 +01:00
parent dbb1676fbe
commit 31bc8485f3
3 changed files with 12 additions and 39 deletions

View File

@@ -525,7 +525,7 @@ struct
val b = colToRealString b
val x = String.concat ["(((x + ", x, ") - halfWidth) / halfWidth)"]
val y = String.concat ["(~(y + ", y, ") - halfHeight) / halfHeight)"]
val y = String.concat ["((~(y + ", y, ") - halfHeight) / halfHeight)"]
val ex = String.concat
[ "((((("
@@ -570,7 +570,7 @@ struct
val bintree = merge (qtree, squares)
val coords = BinTree.foldr (toExportStringFolder, bintree, [])
val coords = String.concatWith "," coords
val coords = String.concatWith ",\n" coords
val header = String.concat
[ "structure AAA = \nstruct\n"
@@ -582,7 +582,7 @@ struct
, " #[\n"
]
val footer = String.concat [" ]\n", " end\n", "end\n"]
val footer = String.concat ["\n ]\n", " end\n", "end\n"]
in
String.concat [header, coords, footer]
end