Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions System/Console/Haskeline.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module System.Console.Haskeline(
runInputT,
haveTerminalUI,
mapInputT,
mapInputT_,
-- ** Behaviors
Behavior,
runInputTBehavior,
Expand Down
5 changes: 5 additions & 0 deletions System/Console/Haskeline/InputT.hs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ mapInputT f = InputT . mapReaderT (mapReaderT (mapReaderT
(mapReaderT (mapReaderT f))))
. unInputT

mapInputT_ :: (m () -> m ()) -> InputT m () -> InputT m ()
mapInputT_ f = InputT . mapReaderT (mapReaderT (mapReaderT
(mapReaderT (mapReaderT f))))
. unInputT

-- | Read input from 'stdin'.
-- Use terminal-style interaction if 'stdin' is connected to
-- a terminal and has echoing enabled. Otherwise (e.g., if 'stdin' is a pipe), use
Expand Down