Safe Haskell | None |
---|---|
Language | Haskell2010 |
Example usage of this package:
import UU.UUAGC.Diagrams dia :: AGBackend b => AGDiagram b dia = production ["count", "level"] "Docs" ["html", "count"] [ child ["count", "level"] "hd" ["html", "count"] , child ["count", "level"] "tl" ["html", "count"] ] # agrule shaftL "lhs.count" "hd.count" # agrule shaftL "lhs.level" "hd.level" # agrule shaftR "lhs.level" "tl.level" # agrule shaftL "hd.html" "lhs.html" # agrule shaftR "tl.html" "lhs.html" # agrule shaftR "tl.count" "lhs.count" # agrule shaftT "hd.count" "tl.count"
- production :: AGBackend b => [String] -> String -> [String] -> [Child b] -> AGDiagram b
- child :: AGBackend b => [String] -> String -> [String] -> Child b
- agrule :: AGBackend b => Trail R2 -> String -> String -> AGDiagram b -> AGDiagram b
- shaftL :: Trail R2
- shaftR :: Trail R2
- shaftT :: Trail R2
- shaftB :: Trail R2
- shaftD :: Trail R2
- (#) :: a -> (a -> b) -> b
- type AGDiagram b = Diagram b R2
- class (Renderable (Path R2) b, Backend b R2) => AGBackend b
- data Child b
Documentation
production :: AGBackend b => [String] -> String -> [String] -> [Child b] -> AGDiagram b Source
Construct a diagram for a full production, given its inherited attributes, name, synthesized attributes and children
child :: AGBackend b => [String] -> String -> [String] -> Child b Source
Construct a child given its inherited attributes, name and sythesized attributes.
(#) :: a -> (a -> b) -> b infixl 8
Postfix function application, for conveniently applying
attributes. Unlike ($)
, (#)
has a high precedence (8), so d
# foo # bar
can be combined with other things using operators
like (|||)
or (<>)
without needing parentheses.