uni-graphs-2.2.1.2: Graphs
Safe HaskellNone
LanguageHaskell2010

Graphs.VersionDag

Description

This module implements a VersionDag, a graph which is used for displaying versions within the Workbench.

The main differences between this and normal SimpleGraph's are that (1) the parents of a node are fixed when it is created, as are all arc labels and arc type labels. (2) it is possible to selectively "hide" nodes from being displayed. We intelligently display the structure between these nodes. (3) it is not permitted to delete a node with children. (Though it may be hidden.)

Synopsis

Documentation

data VersionDag nodeKey nodeInfo arcInfo Source #

newVersionDag :: (Ord nodeKey, Ord arcInfo, Eq nodeInfo) => (nodeInfo -> Bool) -> (nodeInfo -> nodeKey) -> (nodeInfo -> [(arcInfo, nodeKey)]) -> IO (VersionDag nodeKey nodeInfo arcInfo) Source #

addVersion :: (Ord nodeKey, Ord arcInfo, Eq nodeInfo) => VersionDag nodeKey nodeInfo arcInfo -> nodeInfo -> IO () Source #

addVersions :: (Ord nodeKey, Ord arcInfo, Eq nodeInfo) => VersionDag nodeKey nodeInfo arcInfo -> [nodeInfo] -> IO () Source #

deleteVersion :: Ord nodeKey => VersionDag nodeKey nodeInfo arcInfo -> nodeKey -> IO () Source #

setNodeInfo :: (Ord nodeKey, Ord arcInfo, Eq nodeInfo) => VersionDag nodeKey nodeInfo arcInfo -> nodeInfo -> IO () Source #

Change the nodeInfo of something already added.

changeIsHidden :: (Ord nodeKey, Ord arcInfo, Eq nodeInfo) => VersionDag nodeKey nodeInfo arcInfo -> (nodeInfo -> Bool) -> IO () Source #

Change the hidden function

toDisplayedGraph :: (Ord nodeKey, Ord arcInfo, Eq nodeInfo) => VersionDag nodeKey nodeInfo arcInfo -> GraphConnection (nodeInfo, Bool) () (Maybe arcInfo) () Source #

toInputGraph :: (Ord nodeKey, Ord arcInfo, Eq nodeInfo) => VersionDag nodeKey nodeInfo arcInfo -> GraphConnection nodeInfo () arcInfo () Source #

getInputGraphBack :: (Ord nodeKey, Ord arcInfo, Eq nodeInfo) => VersionDag nodeKey nodeInfo arcInfo -> (nodeKey -> nodeInfo -> graphBackNodeKey) -> IO (GraphBack nodeKey graphBackNodeKey) Source #

Get the input graph in the form of FindCommonParents.GraphBack. NB. (1) the confusion in the type variable "nodeKey" as used in FindCommonParents is not the same as our "nodeKey". (2) we get a snapshot of the state of the input graph at a particular time

nodeKeyExists :: Ord nodeKey => VersionDag nodeKey nodeInfo arcInfo -> nodeKey -> IO Bool Source #

lookupNodeKey :: Ord nodeKey => VersionDag nodeKey nodeInfo arcInfo -> nodeKey -> IO (Maybe nodeInfo) Source #

getNodeInfos :: Ord nodeKey => VersionDag nodeKey nodeInfo arcInfo -> IO [nodeInfo] Source #