definition: |
showFunctionInModule :: ReplState -> String -> String -> IO (Maybe ReplState) showFunctionInModule rst mod fun = checkForWish $ checkAndCallCpmTool "curry-showsource" "sourceproggui" $ \spgui -> do writeVerboseInfo rst 1 $ "Showing source code of function '" ++ mod ++ "." ++ fun ++ "' in separate window..." let spguicmd = "CURRYPATH=" ++ intercalate [searchPathSeparator] (loadPaths rst) ++ " && export CURRYPATH && " ++ spgui ++ " " ++ mod writeVerboseInfo rst 2 $ "Executing: " ++ spguicmd (rst',h') <- maybe (do h <- connectToCommand spguicmd return (rst {sourceguis = (mod,(fun,h)) : sourceguis rst }, h)) (\ (f,h) -> do hPutStrLn h ('-':f) hFlush h return (rst {sourceguis = updateFun (sourceguis rst) mod fun }, h)) (lookup mod (sourceguis rst)) hPutStrLn h' ('+':fun) hFlush h' return (Just rst') where updateFun [] _ _ = [] updateFun ((m,(f,h)):sguis) md fn = if m==md then (m,(fn,h)):sguis else (m,(f,h)) : updateFun sguis md fn |
demand: |
no demanded arguments |
deterministic: |
deterministic operation |
documentation: |
-- Showing source code of functions via SourcProgGUI tool. -- If necessary, open a new connection and remember it in the repl state. |
failfree: |
<FAILING> |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{(_,_,_) |-> _} |
name: |
showFunctionInModule |
precedence: |
no precedence defined |
result-values: |
_ |
signature: |
REPL.State.ReplState -> String -> String -> Prelude.IO (Prelude.Maybe REPL.State.ReplState) |
solution-complete: |
operation might suspend on free variables |
terminating: |
possibly non-terminating |
totally-defined: |
possibly non-reducible on same data term |