phino 0.0.0.75 → 0.0.76
raw patch · 6 files changed
+46/−42 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ LaTeX: instance LaTeX.ToLaTeX CST.BYTES
Files
- README.md +34/−34
- phino.cabal +1/−1
- src/CST.hs +1/−1
- src/LaTeX.hs +7/−3
- src/Render.hs +1/−1
- test/CLISpec.hs +2/−2
README.md view
@@ -34,7 +34,7 @@ ```bash cabal update-cabal install --overwrite-policy=always phino-0.0.0.74+cabal install --overwrite-policy=always phino-0.0.0.75 phino --version ``` @@ -80,7 +80,7 @@ ```bash $ phino --version-0.0.0.0+0.0.0 ``` You can ensure scripts are run with a specific version of `phino` using@@ -430,55 +430,55 @@ === parse/phi === warmup: 3 iterations batches: 10 x 1- total: 1412671.918 μs- avg: 141267.192 μs- min: 127755.002 μs- max: 177453.762 μs- std dev: 17165.732 μs+ total: 1290854.386 μs+ avg: 129085.439 μs+ min: 117675.375 μs+ max: 160991.228 μs+ std dev: 16165.007 μs === parse/xmir === warmup: 3 iterations batches: 10 x 1- total: 7639818.091 μs- avg: 763981.809 μs- min: 708011.145 μs- max: 797305.119 μs- std dev: 24602.554 μs+ total: 7637629.544 μs+ avg: 763762.954 μs+ min: 696051.278 μs+ max: 831716.958 μs+ std dev: 52360.341 μs === rewrite/normalize === warmup: 3 iterations batches: 10 x 1- total: 426645.736 μs- avg: 42664.574 μs- min: 40102.854 μs- max: 47835.610 μs- std dev: 2300.441 μs+ total: 415395.436 μs+ avg: 41539.544 μs+ min: 39692.420 μs+ max: 43795.163 μs+ std dev: 1024.358 μs === print/sweet/multiline === warmup: 3 iterations batches: 10 x 1- total: 3941287.369 μs- avg: 394128.737 μs- min: 372511.010 μs- max: 405677.385 μs- std dev: 9679.300 μs+ total: 4419741.373 μs+ avg: 441974.137 μs+ min: 436234.182 μs+ max: 449493.725 μs+ std dev: 4320.864 μs === print/sweet/flat === warmup: 3 iterations batches: 10 x 1- total: 4011952.457 μs- avg: 401195.246 μs- min: 382116.656 μs- max: 426194.357 μs- std dev: 13451.138 μs+ total: 4477106.988 μs+ avg: 447710.699 μs+ min: 415845.032 μs+ max: 469072.588 μs+ std dev: 19401.756 μs === print/salty/multiline === warmup: 3 iterations batches: 10 x 1- total: 13481660.845 μs- avg: 1348166.084 μs- min: 1297555.496 μs- max: 1397510.998 μs- std dev: 35358.091 μs+ total: 13533731.009 μs+ avg: 1353373.101 μs+ min: 1309742.771 μs+ max: 1419096.264 μs+ std dev: 36341.120 μs ``` The results were calculated in [this GHA job][benchmark-gha]-on 2026-06-08 at 09:53,+on 2026-06-08 at 18:07, on Linux with 4 CPUs. <!-- benchmark_end -->@@ -514,4 +514,4 @@ [jna]: https://github.com/java-native-access/jna [jna-native]: https://github.com/java-native-access/jna/blob/master/src/com/sun/jna/Native.java [jeo]: https://github.com/objectionary/jeo-maven-plugin-[benchmark-gha]: https://github.com/objectionary/phino/actions/runs/27129589244+[benchmark-gha]: https://github.com/objectionary/phino/actions/runs/27157143875
phino.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: phino-version: 0.0.0.75+version: 0.0.76 license: MIT synopsis: Command-Line Manipulator of 𝜑-Calculus Expressions description: Please see the README on GitHub at <https://github.com/objectionary/phino#readme>
src/CST.hs view
@@ -88,7 +88,7 @@ | B -- 𝐵 | B' -- B | D -- δ- | D' -- d+ | D' -- \delta | TAIL -- t | F -- F deriving (Eq, Show)
src/LaTeX.hs view
@@ -244,7 +244,8 @@ toLaTeX bds = bds instance ToLaTeX PAIR where- toLaTeX PA_DELTA{..} = PA_DELTA' bytes+ toLaTeX PA_DELTA{..} = toLaTeX (PA_DELTA' bytes)+ toLaTeX PA_DELTA'{..} = PA_DELTA' (toLaTeX bytes) toLaTeX PA_LAMBDA{..} = PA_LAMBDA' (piped func) toLaTeX PA_LAMBDA'{..} = PA_LAMBDA' (piped func) toLaTeX PA_VOID{..} = PA_VOID (toLaTeX attr) arrow void@@ -254,7 +255,6 @@ toLaTeX PA_META_DELTA'{..} = PA_META_DELTA' (toLaTeX meta) toLaTeX PA_META_LAMBDA{..} = toLaTeX (PA_META_LAMBDA' meta) toLaTeX PA_META_LAMBDA'{..} = PA_META_LAMBDA' (toLaTeX meta)- toLaTeX pair = pair instance ToLaTeX META where toLaTeX META{..} =@@ -271,6 +271,10 @@ toLaTeX D = D' toLaTeX mh = mh +instance ToLaTeX BYTES where+ toLaTeX (BT_META meta) = BT_META (toLaTeX meta)+ toLaTeX bts = bts+ instance ToLaTeX APP_ARG where toLaTeX APP_ARG{..} = APP_ARG (toLaTeX expr) (toLaTeX args) @@ -366,7 +370,7 @@ dataizeOutcome :: Y.DataizeOutcome -> String dataizeOutcome (Y.DoDataize (Y.DaExpr expr)) = dataize (renderToLatex (expressionToCST expr) defaultLatexContext) dataizeOutcome (Y.DoDataize (Y.DaMorph expr)) = dataize (morph (renderToLatex (expressionToCST expr) defaultLatexContext))- dataizeOutcome (Y.DoData bytes) = T.unpack (render (toCST' bytes :: BYTES))+ dataizeOutcome (Y.DoData bytes) = T.unpack (render (toLaTeX (toCST' bytes :: BYTES))) dataizeOutcome Y.DoNothing = "\\varnothing" -- Render a single rule row through the shared \trrule macro: name, left-hand
src/Render.hs view
@@ -120,7 +120,7 @@ render B = "𝐵" render B' = "B" render D = "δ"- render D' = "d"+ render D' = "\\delta" render TAIL = "t" render F = "F"
test/CLISpec.hs view
@@ -1044,8 +1044,8 @@ [ unlines [ "\\begin{tabular}{rl}" , "\\trrule{delta}"- , " { \\mathbb{D}( [[ B_1, D> δ, B_2 ]] ) }"- , " { δ }"+ , " { \\mathbb{D}( [[ B_1, D> \\delta, B_2 ]] ) }"+ , " { \\delta }" , " { }" , " { }" , "\\trrule{box}"