makeDGNav :: LibEnv -> DGraph -> [LNode DGNodeLab] -> DGNav
makeDGNav le dg cnl = DGNav le dg cnl' where
    cnl' | null cnl = filter f $ labNodesDG dg
         | otherwise = cnl
         where f (n, _) = not $ any isDefLink $ outDG dg n
makeDGNav :: LibEnv -> DGraph -> [LNode DGNodeLab] -> DGNav
makeDGNav le dg cnl = DGNav le dg cnl' where
    cnl' | null cnl = filter f $ labNodesDG dg
         | otherwise = cnl
         where f (n, _) = not $ any isDefLink $ outDG dg n
makeDGNav le dg cnl = DGNav le dg cnl' where
    cnl' | null cnl = filter f $ labNodesDG dg
         | otherwise = cnl
         where f (n, _) = not $ any isDefLink $ outDG dg n