Hoogle Search
Within LTS Haskell 24.25 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
hLineInteract :: (HVIO a, HVIO b) => a -> b -> ([String] -> [String]) -> IO ()MissingH System.IO.Utils Line-based interaction over arbitrary handles. This is similar to wrapping hInteract with lines and unlines. One could view this function like this:
hLineInteract finput foutput func = let newf = unlines . func . lines in hInteract finput foutput newf
Though the actual implementation is this for efficiency:hLineInteract finput foutput func = do lines <- hGetLines finput hPutStrLns foutput (func lines)
lineInteract :: ([String] -> [String]) -> IO ()MissingH System.IO.Utils Line-based interaction. This is similar to wrapping your interact functions with lines and unlines. This equality holds:
lineInteract = hLineInteract stdin stdout
Here's an example:main = lineInteract (filter (startswith "1"))
This will act as a simple version of grep -- all lines that start with 1 will be displayed; all others will be ignored.optimizeForInteraction :: IO ()MissingH System.IO.Utils Sets stdin and stdout to be line-buffered. This saves resources on stdout, but not many on stdin, since it it still looking for newlines.
mkInteractiveModule :: String -> Moduleghc-lib-parser GHC.Builtin.Names No documentation available.
sfInteract :: BuiltInSynFamily -> [BuiltInFamInjectivity]ghc-lib-parser GHC.Builtin.Types.Literals No documentation available.
tryInteractInertFam :: BuiltInSynFamily -> TyCon -> [Type] -> [Type] -> [(CoAxiomRule, TypeEqn)]ghc-lib-parser GHC.Builtin.Types.Literals No documentation available.
tryInteractTopFam :: BuiltInSynFamily -> TyCon -> [Type] -> Type -> [(CoAxiomRule, TypeEqn)]ghc-lib-parser GHC.Builtin.Types.Literals No documentation available.
BIF_Interact :: FastString -> CoAxiomRule -> (TypeEqn -> Maybe TypeEqn) -> BuiltInFamInjectivityghc-lib-parser GHC.Core.Coercion.Axiom No documentation available.
sfInteract :: BuiltInSynFamily -> [BuiltInFamInjectivity]ghc-lib-parser GHC.Core.Coercion.Axiom No documentation available.
getInteractiveContext :: CoreM InteractiveContextghc-lib-parser GHC.Core.Opt.Monad No documentation available.