-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Open up a pager, like 'less' or 'more'
--   
--   This opens up the user's $PAGER. On Linux, this is usually called
--   <tt>less</tt>. On the various BSDs, this is usually <tt>more</tt>.
--   
--   CHANGES
--   
--   <ul>
--   <li><i>0.1.1.0</i> Add <tt>printOrPage</tt> function and
--   <tt>sendToPagerStrict</tt> function.</li>
--   </ul>
@package pager
@version 0.1.1.0


module System.Pager

-- | If the user's terminal is long enough to display the (strict)
--   <a>Text</a>, just print it. Else, send it to the pager.
--   
--   The text needs to be strict, because the function counts the number of
--   lines in the text. (This is also why it needs to be text, and not a
--   bytestring, because Text has stuff like line-counting).
printOrPage :: Text -> IO ()

-- | Send a lazy <a>ByteString</a> to the user's <tt>$PAGER</tt>.
sendToPager :: ByteString -> IO ()

-- | Send a strict <a>ByteString</a> to the user's <tt>$PAGER</tt>.
sendToPagerStrict :: ByteString -> IO ()

-- | This finds the user's <tt>$PAGER</tt>. This will fail if:
--   
--   <ul>
--   <li>There is no <tt>$PATH</tt> variable</li>
--   <li>The user doesn't have a <tt>less</tt> or <tt>more</tt> installed,
--   and hasn't specified an alternate program via <tt>$PAGER</tt>.</li>
--   </ul>
findPager :: IO ByteString

-- | This is what <a>sendToPager</a> uses on the back end. It takes a
--   <a>Producer</a>, from <a>Data.Conduit</a>, and then sends the produced
--   bytes to the pager's stdin.
sendToPagerConduit :: Producer (ResourceT IO) ByteString -> IO ()
