Commit e68a5b60 authored by kr.angelov@gmail.com's avatar kr.angelov@gmail.com
Browse files

If we don't have libreadline then we need some dummy definition for complete* functions.

parent e1e8149d
......@@ -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
-----------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment