Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Example of Dot graph construction for the NumHask class heirarchy.
Synopsis
- data Class
- = Magma
- | Unital
- | Associative
- | Commutative
- | Invertible
- | Idempotent
- | Absorbing
- | Group
- | AbelianGroup
- | Additive
- | Subtractive
- | Multiplicative
- | Divisive
- | Distributive
- | Semiring
- | Ring
- | IntegralDomain
- | SemiField
- | Field
- | ExpField
- | QuotientField
- | UpperBoundedField
- | LowerBoundedField
- | TrigField
- | AdditiveAction
- | SubtractiveAction
- | MultiplicativeAction
- | DivisiveAction
- | Actions
- | JoinSemiLattice
- | MeetSemiLattice
- | Lattice
- | BoundedJoinSemiLattice
- | BoundedMeetSemiLattice
- | BoundedLattice
- | Integral
- | Ratio
- | Basis
- | Direction
- | Epsilon
- data Dependency = Dependency {}
- dependencies :: [Dependency]
- classesNH :: [Class]
- classesModule :: [(Class, Text)]
- dependenciesNH :: [Dependency] -> [Dependency]
- graphNHG :: Graph Class
- toLinkNH :: ID -> Text
- dotGraphNH :: Directed -> Graph
Documentation
>>>
import DotParse
>>>
import Chart
>>>
import Optics.Core
>>>
:set -XOverloadedStrings
>>>
:set -XOverloadedLabels
Names of the various classes used in numhask
data Dependency Source #
A class dependency.
Instances
Show Dependency Source # | |
Defined in DotParse.Examples.NumHask showsPrec :: Int -> Dependency -> ShowS # show :: Dependency -> String # showList :: [Dependency] -> ShowS # | |
Eq Dependency Source # | |
Defined in DotParse.Examples.NumHask (==) :: Dependency -> Dependency -> Bool # (/=) :: Dependency -> Dependency -> Bool # | |
Ord Dependency Source # | |
Defined in DotParse.Examples.NumHask compare :: Dependency -> Dependency -> Ordering # (<) :: Dependency -> Dependency -> Bool # (<=) :: Dependency -> Dependency -> Bool # (>) :: Dependency -> Dependency -> Bool # (>=) :: Dependency -> Dependency -> Bool # max :: Dependency -> Dependency -> Dependency # min :: Dependency -> Dependency -> Dependency # |
dependencies :: [Dependency] Source #
List of all dependencies (as at v0.12)
classesModule :: [(Class, Text)] Source #
Names of the modules where each class is located.
dependenciesNH :: [Dependency] -> [Dependency] Source #
List of dependencies to draw.
toLinkNH :: ID -> Text Source #
Convert a node ID to a label for chart-svg charts Doing this directly in dot doesn't quite work because the engines get the width of the link wrong.
dotGraphNH :: Directed -> Graph Source #
NumHask statements in a dot Graph with box shapes for the nodes.
g <- processGraph (dotGraphNH Directed) writeChartOptions "other/nh.svg" (graphToChartWith (defaultChartConfig & set #chartVshift (-4) & set #textSize 12) toLinkNH g)