We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
abort
Thank you for creating a great library.
In docs, the abort function is said to abort and continue the REPL loop.
It works normally in the Command, but REPL does not restart in Options.
Command
Options
Is it intended?
import Control.Monad.IO.Class (liftIO) import Data.List (isPrefixOf) import System.Console.Repline main :: IO () main = mainLoop type Repl a = HaskelineT IO a mainLoop :: IO () mainLoop = evalReplOpts replopts where replopts = ReplOpts { banner = const (pure ">>> ") , command = cmds , options = opts , prefix = Just ':' , multilineCommand = Nothing , tabComplete = Word0 completer , initialiser = ini , finaliser = final } final :: Repl ExitDecision final = do liftIO $ putStrLn "GoodBye!\n" return Exit ini :: Repl () ini = liftIO $ putStrLn "Hello, REPL" cmds :: String -> Repl () cmds str = do liftIO $ print str abort opts :: Options (HaskelineT IO) opts = [ ("foo", foo) ] completer :: Monad m => WordCompleter m completer n = do let opts = [":foo"] return $ filter (isPrefixOf n) opts foo :: String -> Repl () foo args = do liftIO $ print args abort
expected:
>>> :foo hello "hello" >>>
actual:
>>> :foo hello "hello" ghci>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Thank you for creating a great library.
In docs, the
abort
function is said to abort and continue the REPL loop.It works normally in the
Command
, but REPL does not restart inOptions
.Is it intended?
Example code:
expected:
actual:
The text was updated successfully, but these errors were encountered: