definition: |
getModuleOfFunction :: ReplState -> String -> IO String getModuleOfFunction rst funname = do mbprog <- getAcyOfExpr rst $ if isAlpha (head funname) then funname else '(' : funname ++ ")" return $ maybe "" (\ (CurryProg _ _ _ _ _ _ [CFunc _ _ _ _ mainrules] _) -> modOfMain mainrules) mbprog where modOfMain r = case r of [CRule [] (CSimpleRhs (CSymbol (m, _)) [])] -> m [CRule [] (CGuardedRhs [(_, CSymbol (m, _))] [])] -> m _ -> "" |
demand: |
no demanded arguments |
deterministic: |
deterministic operation |
documentation: |
-- Get the module of a function visible in the main program: |
failfree: |
<FAILING> |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{(_,_) |-> _} |
name: |
getModuleOfFunction |
precedence: |
no precedence defined |
result-values: |
_ |
signature: |
REPL.State.ReplState -> 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 |