prolog-graph-lib-0.2.1: Generating images of resolution trees for Prolog queries.

Safe HaskellNone
LanguageHaskell98

Language.Prolog.GraphViz

Documentation

type Path = [Integer] Source #

data Gr a b Source #

Constructors

Gr [(Int, a)] [(Int, Int, b)] 
Instances
Monad m => MonadState Graph (GraphGenT m) Source # 
Instance details

Defined in GraphViz

Methods

get :: GraphGenT m Graph #

put :: Graph -> GraphGenT m () #

state :: (Graph -> (a, Graph)) -> GraphGenT m a #

(Show a, Show b) => Show (Gr a b) Source # 
Instance details

Defined in GraphViz

Methods

showsPrec :: Int -> Gr a b -> ShowS #

show :: Gr a b -> String #

showList :: [Gr a b] -> ShowS #

empty :: Gr a b Source #

insEdge :: (Int, Int, b) -> Gr a b -> Gr a b Source #

insNode :: (Int, a) -> Gr a b -> Gr a b Source #

gelem :: Int -> Gr b1 b2 -> Bool Source #

relabelNode :: (a -> a) -> Int -> Gr a b -> Gr a b Source #

labNodes :: Gr a b -> [(Int, a)] Source #

labEdges :: Gr a b -> [(Int, Int, b)] Source #

newtype GraphGenT m a Source #

Constructors

GraphGenT (StateT Graph m a) 
Instances
MonadTrans GraphGenT Source # 
Instance details

Defined in GraphViz

Methods

lift :: Monad m => m a -> GraphGenT m a #

Monad m => MonadState Graph (GraphGenT m) Source # 
Instance details

Defined in GraphViz

Methods

get :: GraphGenT m Graph #

put :: Graph -> GraphGenT m () #

state :: (Graph -> (a, Graph)) -> GraphGenT m a #

MonadError e m => MonadError e (GraphGenT m) Source # 
Instance details

Defined in GraphViz

Methods

throwError :: e -> GraphGenT m a #

catchError :: GraphGenT m a -> (e -> GraphGenT m a) -> GraphGenT m a #

Monad m => Monad (GraphGenT m) Source # 
Instance details

Defined in GraphViz

Methods

(>>=) :: GraphGenT m a -> (a -> GraphGenT m b) -> GraphGenT m b #

(>>) :: GraphGenT m a -> GraphGenT m b -> GraphGenT m b #

return :: a -> GraphGenT m a #

fail :: String -> GraphGenT m a #

Functor m => Functor (GraphGenT m) Source # 
Instance details

Defined in GraphViz

Methods

fmap :: (a -> b) -> GraphGenT m a -> GraphGenT m b #

(<$) :: a -> GraphGenT m b -> GraphGenT m a #

MonadFix m => MonadFix (GraphGenT m) Source # 
Instance details

Defined in GraphViz

Methods

mfix :: (a -> GraphGenT m a) -> GraphGenT m a #

Monad m => Applicative (GraphGenT m) Source # 
Instance details

Defined in GraphViz

Methods

pure :: a -> GraphGenT m a #

(<*>) :: GraphGenT m (a -> b) -> GraphGenT m a -> GraphGenT m b #

liftA2 :: (a -> b -> c) -> GraphGenT m a -> GraphGenT m b -> GraphGenT m c #

(*>) :: GraphGenT m a -> GraphGenT m b -> GraphGenT m b #

(<*) :: GraphGenT m a -> GraphGenT m b -> GraphGenT m a #

MonadPlus m => Alternative (GraphGenT m) Source # 
Instance details

Defined in GraphViz

Methods

empty :: GraphGenT m a #

(<|>) :: GraphGenT m a -> GraphGenT m a -> GraphGenT m a #

some :: GraphGenT m a -> GraphGenT m [a] #

many :: GraphGenT m a -> GraphGenT m [a] #

MonadPlus m => MonadPlus (GraphGenT m) Source # 
Instance details

Defined in GraphViz

Methods

mzero :: GraphGenT m a #

mplus :: GraphGenT m a -> GraphGenT m a -> GraphGenT m a #

Monad m => MonadGraphGen (GraphGenT m) Source # 
Instance details

Defined in GraphViz

Methods

createConnections :: Branch -> [Branch] -> [Branch] -> GraphGenT m () #

markSolution :: Unifier -> GraphGenT m () #

markCutBranches :: Stack -> GraphGenT m () #

data CutFlag Source #

Constructors

WasNotCut 
WasCut 
Instances
Monad m => MonadState Graph (GraphGenT m) Source # 
Instance details

Defined in GraphViz

Methods

get :: GraphGenT m Graph #

put :: Graph -> GraphGenT m () #

state :: (Graph -> (a, Graph)) -> GraphGenT m a #

htmlUnifier :: (Show a1, Show a2) => [(a1, a2)] -> [TextItem] Source #

modifyLabel :: MonadState (Gr a b) m => Int -> (a -> a) -> m () Source #