subloops :: DynGraph gr => gr a b -> [gr a b]
subloops g = cycs
    where
    sccs = scc g
    cycs = filter hasCycle $ map (flip subgraph g) sccs
    hasCycle g = if noNodes g == 1 then hasLoop g else True
subloops :: DynGraph gr => gr a b -> [gr a b]
subloops g = cycs
    where
    sccs = scc g
    cycs = filter hasCycle $ map (flip subgraph g) sccs
    hasCycle g = if noNodes g == 1 then hasLoop g else True
subloops g = cycs
    where
    sccs = scc g
    cycs = filter hasCycle $ map (flip subgraph g) sccs
    hasCycle g = if noNodes g == 1 then hasLoop g else True