packages feed

phino 0.0.103 → 0.0.104

raw patch · 3 files changed

+13/−2 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

phino.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: phino-version: 0.0.103+version: 0.0.104 license: MIT synopsis: Command-Line Manipulator of 𝜑-Calculus Expressions description: Please see the README on GitHub at <https://github.com/objectionary/phino#readme>
src/Margin.hs view
@@ -31,7 +31,7 @@   withMargin' _ str@EX_STRING{} = str   withMargin' cfg EX_DISPATCH{..} = EX_DISPATCH (withMargin' cfg expr) space attr   withMargin' cfg EX_PHI_AGAIN{..} = EX_PHI_AGAIN prefix idx (withMargin' cfg expr)-  withMargin' cfg EX_PHI_MEET{..} = EX_PHI_MEET prefix idx (withMargin' cfg expr)+  withMargin' _ EX_PHI_MEET{..} = EX_PHI_MEET prefix idx (toSingleLine expr)   withMargin' cfg@(extra, margin) ex@EX_APPLICATION{tab = tab@(TAB indt), ..} =     let single = toSingleLine ex         main = withMargin' cfg expr
test/PrinterSpec.hs view
@@ -80,6 +80,17 @@             parseExpression printed `shouldBe` Right expr       ) +  describe "printExpression keeps a compressed meet atomic under a narrow margin" $+    -- A \phinoMeet is a single \overbracket visual unit, so its body must stay+    -- on one line even when the surrounding margin forces the outer formation to+    -- wrap. A newline inside the braced argument would raise "! Missing }+    -- inserted" in an aligned/gathered LaTeX context (see #978).+    it "renders the meet body on a single line even when the margin wraps its parent" $ do+      let body = ExFormation [BiTau (AtLabel "alpha") ExRoot, BiTau (AtLabel "beta") ExRoot, BiTau (AtLabel "gamma") ExRoot]+          expr = ExFormation [BiTau (AtLabel "x") (ExPhiMeet Nothing 5 body)]+          printed = printExpression' expr (SWEET, UNICODE, MULTILINE, 30)+      printed `shouldContain` "\\phinoMeet{5}{ ⟦ alpha ↦ Φ, beta ↦ Φ, gamma ↦ Φ ⟧ }"+   describe "printExpression with default config" $     forM_       [ ("empty formation", ExFormation [BiVoid AtRho], "⟦⟧")