Module BrowserGUI

GUI for CurryBrowser, a generic analysis environment for declarative programs.

Author: Michael Hanus

Version: October 2023

Summary of exported operations:

showExecTime :: Bool  Deterministic 
title :: String  Deterministic 
main :: IO ()  Non-deterministic 
readmeFile :: String  Deterministic 
startBrowser :: String -> IO ()  Non-deterministic 
trees2strings :: [Tree a] -> [String]  Deterministic 
tree2strings :: Int -> Tree a -> [String]  Deterministic 
blanks :: Int -> String  Deterministic 
getTreesNodeName :: Int -> [Tree a] -> String  Deterministic 
getTreesValue :: Int -> [Tree a] -> a  Deterministic 
changeTrees :: Int -> [Tree (String,[(String,[String])])] -> IO [Tree (String,[(String,[String])])]  Deterministic 
openNode :: Eq a => (a,[(a,[String])]) -> IO [Tree (String,[(a,[String])])]  Deterministic 
getMainLoadPath :: IORef GuiState -> IO [String]  Deterministic 
getTrees :: IORef GuiState -> IO [Tree (String,[(String,[String])])]  Deterministic 
storeTrees :: IORef GuiState -> [Tree (String,[(String,[String])])] -> IO ()  Deterministic 
getAllImportsOfModule :: IORef GuiState -> String -> IO [String]  Deterministic 
getFuns :: IORef GuiState -> IO [FuncDecl]  Deterministic 
storeSelectedFunctions :: IORef GuiState -> [FuncDecl] -> IO ()  Deterministic 
setMainContentsModule :: IORef GuiState -> String -> ContentsKind -> String -> IO ()  Deterministic 
getContentsModule :: IORef GuiState -> IO String  Deterministic 
getMainContents :: IORef GuiState -> IO (ContentsKind,String)  Deterministic 
getFunctionListKind :: IORef GuiState -> IO Bool  Deterministic 
setFunctionListKind :: IORef GuiState -> Bool -> IO ()  Deterministic 
getAllModules :: IORef GuiState -> IO [Prog]  Deterministic 
getIntWithName :: IORef GuiState -> String -> IO Prog  Deterministic 
getProgWithName :: IORef GuiState -> (String -> IO ()) -> String -> IO Prog  Non-deterministic 
getAllTypes :: IORef GuiState -> (String -> IO ()) -> String -> IO [TypeDecl]  Deterministic 
getAllFunctions :: IORef GuiState -> (String -> IO ()) -> String -> IO [FuncDecl]  Non-deterministic 
getAllFunctionNames :: IORef GuiState -> String -> IO [(String,String)]  Deterministic 
getCurrentFunctionAnalysis :: IORef GuiState -> IO (Maybe (FunctionAnalysis AnalysisResult))  Deterministic 
setCurrentFunctionAnalysis :: IORef GuiState -> Maybe (FunctionAnalysis AnalysisResult) -> IO ()  Deterministic 
readProgAndStore :: IORef GuiState -> (String -> IO ()) -> String -> IO Prog  Non-deterministic 
readProgAndStoreIfNecessary :: IORef GuiState -> (String -> IO ()) -> (String,InterfaceOrFlatProg) -> IO ()  Non-deterministic 
findDecl4name :: [FuncDecl] -> (String,String) -> FuncDecl  Deterministic 
browserGUI :: IORef GuiState -> WidgetRef -> WidgetRef -> [String] -> Widget  Non-deterministic 
isPublic :: FuncDecl -> Bool  Deterministic 
findFunDeclInProgText :: ContentsKind -> String -> (String,String) -> Int  Deterministic 
findFirstDeclLine :: Eq a => [a] -> [[a]] -> Int -> Int  Deterministic 
readFileInBrowserDir :: String -> IO String  Deterministic 
leqQName :: (String,String) -> (String,String) -> Bool  Deterministic 
showQNameWithMod :: (String,String) -> String  Deterministic 
noAnalysisText :: String  Deterministic 
getAnswer :: String -> String -> (String -> IO ()) -> IO ()  Non-deterministic 

Exported datatypes:


Tree

Constructors:

  • Leaf :: String -> a -> Tree a
  • Node :: String -> a -> [Tree a] -> Tree a

ImportTree

Type synonym: ImportTree = [Tree (String,[(String,[String])])]


GuiState

Constructors:


Exported operations:

showExecTime :: Bool  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

title :: String  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

main :: IO ()  Non-deterministic 

readmeFile :: String  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

startBrowser :: String -> IO ()  Non-deterministic 

trees2strings :: [Tree a] -> [String]  Deterministic 

tree2strings :: Int -> Tree a -> [String]  Deterministic 

blanks :: Int -> String  Deterministic 

getTreesNodeName :: Int -> [Tree a] -> String  Deterministic 

getTreesValue :: Int -> [Tree a] -> a  Deterministic 

changeTrees :: Int -> [Tree (String,[(String,[String])])] -> IO [Tree (String,[(String,[String])])]  Deterministic 

openNode :: Eq a => (a,[(a,[String])]) -> IO [Tree (String,[(a,[String])])]  Deterministic 

getMainLoadPath :: IORef GuiState -> IO [String]  Deterministic 

getTrees :: IORef GuiState -> IO [Tree (String,[(String,[String])])]  Deterministic 

storeTrees :: IORef GuiState -> [Tree (String,[(String,[String])])] -> IO ()  Deterministic 

getAllImportsOfModule :: IORef GuiState -> String -> IO [String]  Deterministic 

getFuns :: IORef GuiState -> IO [FuncDecl]  Deterministic 

setMainContentsModule :: IORef GuiState -> String -> ContentsKind -> String -> IO ()  Deterministic 

getContentsModule :: IORef GuiState -> IO String  Deterministic 

getMainContents :: IORef GuiState -> IO (ContentsKind,String)  Deterministic 

getFunctionListKind :: IORef GuiState -> IO Bool  Deterministic 

setFunctionListKind :: IORef GuiState -> Bool -> IO ()  Deterministic 

getAllModules :: IORef GuiState -> IO [Prog]  Deterministic 

getIntWithName :: IORef GuiState -> String -> IO Prog  Deterministic 

getProgWithName :: IORef GuiState -> (String -> IO ()) -> String -> IO Prog  Non-deterministic 

getAllTypes :: IORef GuiState -> (String -> IO ()) -> String -> IO [TypeDecl]  Deterministic 

getAllFunctions :: IORef GuiState -> (String -> IO ()) -> String -> IO [FuncDecl]  Non-deterministic 

getAllFunctionNames :: IORef GuiState -> String -> IO [(String,String)]  Deterministic 

readProgAndStore :: IORef GuiState -> (String -> IO ()) -> String -> IO Prog  Non-deterministic 

readProgAndStoreIfNecessary :: IORef GuiState -> (String -> IO ()) -> (String,InterfaceOrFlatProg) -> IO ()  Non-deterministic 

findDecl4name :: [FuncDecl] -> (String,String) -> FuncDecl  Deterministic 

Further infos:
  • partially defined

browserGUI :: IORef GuiState -> WidgetRef -> WidgetRef -> [String] -> Widget  Non-deterministic 

isPublic :: FuncDecl -> Bool  Deterministic 

findFunDeclInProgText :: ContentsKind -> String -> (String,String) -> Int  Deterministic 

findFirstDeclLine :: Eq a => [a] -> [[a]] -> Int -> Int  Deterministic 

readFileInBrowserDir :: String -> IO String  Deterministic 

leqQName :: (String,String) -> (String,String) -> Bool  Deterministic 

showQNameWithMod :: (String,String) -> String  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

noAnalysisText :: String  Deterministic 

Further infos:
  • solution complete, i.e., able to compute all solutions

getAnswer :: String -> String -> (String -> IO ()) -> IO ()  Non-deterministic