Created
July 7, 2017 14:16
-
-
Save simonmichael/929f7434a4db2216382d72c8a1345ead to your computer and use it in GitHub Desktop.
running an interactive pager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
runPagerForTopic :: FilePath -> Topic -> IO () | |
runPagerForTopic exe t = do | |
(Just inp, _, _, ph) <- createProcess (proc exe []){ | |
std_in=CreatePipe | |
} | |
hPutStrLn inp (lookupDocTxt t) | |
_ <- waitForProcess ph | |
return () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment