From: kr.angelov@gmail.com Date: Sun, 12 Feb 2006 09:50:19 +0000 (+0000) Subject: If we don't have libreadline then we need some dummy definition for complete* functions. X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=e68a5b608d7ac55f133481d9e428119850668e7a If we don't have libreadline then we need some dummy definition for complete* functions. --- diff --git a/ghc/compiler/ghci/InteractiveUI.hs b/ghc/compiler/ghci/InteractiveUI.hs index c5edfa6..f8ee7bf 100644 --- a/ghc/compiler/ghci/InteractiveUI.hs +++ b/ghc/compiler/ghci/InteractiveUI.hs @@ -1186,6 +1186,9 @@ cleanType ty = do -- ----------------------------------------------------------------------------- -- Completion +completeNone :: String -> IO [String] +completeNone w = return [] + #ifdef USE_READLINE completeWord :: String -> Int -> Int -> IO (Maybe (String, [String])) completeWord w start end = do @@ -1221,8 +1224,6 @@ is_cmd line | ((':':w) : _) <- words (dropWhile isSpace line) = Just w | otherwise = Nothing -completeNone w = return [] - completeCmd w = do cmds <- readIORef commands return (filter (w `isPrefixOf`) (map (':':) (map cmdName cmds))) @@ -1287,6 +1288,15 @@ allExposedModules dflags = map GHC.mkModule (concat (map exposedModules (filter exposed (eltsUFM pkg_db)))) where pkg_db = pkgIdMap (pkgState dflags) +#else +completeCmd = completeNone +completeMacro = completeNone +completeIdentifier = completeNone +completeModule = completeNone +completeHomeModule = completeNone +completeSetOptions = completeNone +completeFilename = completeNone +completeHomeModuleOrFile=completeNone #endif -----------------------------------------------------------------------------