packages feed

uuagc-diagrams 0.1.0.0 → 0.1.1.0

raw patch · 2 files changed

+15/−5 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ UU.UUAGC.Diagrams: indrule :: AGBackend b => String -> String -> AGDiagram b -> AGDiagram b

Files

UU/UUAGC/Diagrams.hs view
@@ -24,7 +24,7 @@ -----------------------------------------------------------------------------  module UU.UUAGC.Diagrams-       (production, child, agrule,+       (production, child, agrule, indrule,         shaftL, shaftR, shaftT, shaftB, shaftD,         (#),         AGDiagram, AGBackend, Child) where@@ -62,6 +62,16 @@   tb False  = 90 @@ deg   tb True   = 270 @@ deg +-- | Construct an induced dependency arrow between two attributes, similar to+--   'agrule' but with an explicit trial.+indrule :: AGBackend b => String -> String -> AGDiagram b -> AGDiagram b+indrule s1 s2 = connectPerim' (with & headLength .~ (Normalized 0.025) & arrowShaft .~ shaftB & shaftStyle %~ dashed . opacity 0.5) n1 n2 tb tb where+  t = "lhs." `isPrefixOf` s1+  n1 = if t then s1 ++ ".syn" else s1 ++ ".inh"+  n2 = if t then s2 ++ ".inh" else s2 ++ ".syn"+  tb = if t then 90 @@ deg else 270 @@ deg+  dashed  = dashingN [0.01,0.01] 0+ shaftL, shaftR, shaftT, shaftB, shaftD :: Trail R2  -- | Line that first moves left and then right@@ -98,7 +108,7 @@ node top inh s syn ch = res # applyAll lines where   res = toprow         ===-        strutY 2+        (if null ch then mempty else strutY 2)         ===         (hcats 1.5 $ map unChild ch) # centerX   lines = alines ++ chLines@@ -116,8 +126,8 @@   lhs = beside (negateV unitY) (           beside unitY           (circle 0.5 # named name # lc grey)-          (if top then (text' 0.9 "lhs" === strutY 0.1) else mempty))-        (strutY 0.1 === text' 0.9 s)+          (if top then (text' 0.9 s === strutY 0.1) else mempty))+        (strutY 0.1 === text' 0.9 name)  text' :: AGBackend b =>          Double -> String -> AGDiagram b
uuagc-diagrams.cabal view
@@ -1,5 +1,5 @@ name:                uuagc-diagrams-version:             0.1.0.0+version:             0.1.1.0 synopsis:            Utility for drawing attribute grammar pictures with the diagrams package -- description:          license:             BSD3