CurryInfo: currybrowse-3.0.0 / BrowserGUI.getAllImportsOfModule

definition:
getAllImportsOfModule :: IORef GuiState -> String -> IO [String]
getAllImportsOfModule gs mod = do
  (GS trees _ _ _ _ _ _) <- readIORef gs
  return (collectImports (importsOfRoot trees) [mod] [])
 where
   importsOfRoot []                       = []
   importsOfRoot ((Leaf _ (_,imps)) :_)   = imps
   importsOfRoot ((Node _ (_,imps) _) :_) = imps

   collectImports _ [] imps = imps
   collectImports modimps (m:ms) doneimps =
    if m `elem` doneimps
    then collectImports modimps ms doneimps
    else collectImports modimps (ms ++ fromJust (lookup m modimps)) (m:doneimps)
demand:
no demanded arguments
deterministic:
deterministic operation
documentation:
-- extract all reflexive-transitive imports for a module from GUI state:
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,_) |-> _}
name:
getAllImportsOfModule
precedence:
no precedence defined
result-values:
_
signature:
Data.IORef.IORef GuiState -> String -> Prelude.IO [String]
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term