HSH-2.1.3: Library to mix shell scripting with Haskell programs
CopyrightCopyright (C) 2006-2009 John Goerzen
LicenseGNU LGPL, version 2.1 or above
MaintainerJohn Goerzen <jgoerzen@complete.org>
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell98

HSH.Channel

Description

Copyright (c) 2006-2009 John Goerzen, jgoerzen@complete.org

Synopsis

Documentation

data Channel Source #

The main type for communicating between commands. All are expected to be lazy.

Constructors

ChanString String 
ChanBSL ByteString 
ChanHandle Handle 

Instances

Instances details
Show (Channel -> IO Channel) 
Instance details

Defined in HSH.Command

Methods

showsPrec :: Int -> (Channel -> IO Channel) -> ShowS

show :: (Channel -> IO Channel) -> String

showList :: [Channel -> IO Channel] -> ShowS

ShellCommand (Channel -> IO Channel) Source # 
Instance details

Defined in HSH.Command

chanAsString :: Channel -> IO String Source #

chanAsBSL :: Channel -> IO ByteString Source #

chanAsBS :: Channel -> IO ByteString Source #

chanToHandle :: Bool -> Channel -> Handle -> IO () Source #

Writes the Channel to the given Handle. If the first parameter is True, do this in a separate thread and close the handle afterwards.

class Channelizable a where Source #

Methods

toChannel :: a -> Channel Source #

Instances

Instances details
Channelizable String Source # 
Instance details

Defined in HSH.Channel

Methods

toChannel :: String -> Channel Source #

Channelizable ByteString Source # 
Instance details

Defined in HSH.Channel

Methods

toChannel :: ByteString -> Channel Source #

Channelizable ByteString Source # 
Instance details

Defined in HSH.Channel

Methods

toChannel :: ByteString -> Channel Source #

Channelizable Handle Source # 
Instance details

Defined in HSH.Channel

Methods

toChannel :: Handle -> Channel Source #