sifflet-lib-1.0: Library of modules shared by sifflet and its tests and its exporters.Source codeContentsIndex
Sifflet.Data.Functoid
Synopsis
data Functoid
= FunctoidParts {
fpName :: String
fpArgs :: [String]
fpNodes :: [Node]
}
| FunctoidFunc {
fpFunc :: Function
}
functoidName :: Functoid -> String
functoidArgNames :: Functoid -> [String]
functoidHeader :: Functoid -> String
data FunctoidLayout
= FLayoutTree (TreeLayout ExprNode)
| FLayoutForest [TreeLayout ExprNode] BBox
flayout :: Style -> Functoid -> Env -> Maybe [Value] -> FunctoidLayout
flayoutBBox :: FunctoidLayout -> BBox
flayoutSize :: FunctoidLayout -> Size
flayoutWidth :: FunctoidLayout -> Double
flayoutBottom :: FunctoidLayout -> Double
flayoutWiden :: FunctoidLayout -> Double -> FunctoidLayout
Documentation
data Functoid Source
A Functoid is either a FunctoidParts, representing a partially defined function, or a (completely defined) Function. A FunctoidParts represents an incompletely defined function, which has a function name, argument names, and a list of graph nodes representing the function body which might not yet form a complete expression tree, e.g., nodes might be unconnected.
Constructors
FunctoidParts
fpName :: String
fpArgs :: [String]
fpNodes :: [Node]
FunctoidFunc
fpFunc :: Function
show/hide Instances
functoidName :: Functoid -> StringSource
functoidArgNames :: Functoid -> [String]Source
functoidHeader :: Functoid -> StringSource
data FunctoidLayout Source
What is a FunctoidLayout? You can think of it as a tree layout for a Frame, or for a Functoid, or as a Forest of Tree Layouts! For an Edit frame, it must be a forest, since the nodes are not yet necessarily connected into a tree. For a call frame, it will be a single TreeLayout (singleton list).
Constructors
FLayoutTree (TreeLayout ExprNode)
FLayoutForest [TreeLayout ExprNode] BBox
show/hide Instances
flayout :: Style -> Functoid -> Env -> Maybe [Value] -> FunctoidLayoutSource
Graphically lay out the Functoid. mvalues: Nothing implies an uncalled frame, Just values implies a called frame, even with 0 arguments.
flayoutBBox :: FunctoidLayout -> BBoxSource
flayoutSize :: FunctoidLayout -> SizeSource
flayoutWidth :: FunctoidLayout -> DoubleSource
flayoutBottom :: FunctoidLayout -> DoubleSource
flayoutWiden :: FunctoidLayout -> Double -> FunctoidLayoutSource
Produced by Haddock version 2.6.1