~ubuntu-branches/ubuntu/precise/ghc/precise

« back to all changes in this revision

Viewing changes to libraries/terminfo/System/Console/Terminfo/Edit.hs

  • Committer: Bazaar Package Importer
  • Author(s): Joachim Breitner
  • Date: 2011-01-17 12:49:24 UTC
  • Revision ID: james.westby@ubuntu.com-20110117124924-do1pym1jlf5o636m
Tags: upstream-7.0.1
ImportĀ upstreamĀ versionĀ 7.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- |
 
2
-- Maintainer  : judah.jacobson@gmail.com
 
3
-- Stability   : experimental
 
4
-- Portability : portable (FFI)
 
5
module System.Console.Terminfo.Edit where
 
6
 
 
7
import System.Console.Terminfo.Base
 
8
 
 
9
-- | Clear the screen, and move the cursor to the upper left.
 
10
clearScreen :: Capability (LinesAffected -> TermOutput)
 
11
clearScreen = fmap ($ []) $ tiGetOutput "clear" 
 
12
 
 
13
-- | Clear from beginning of line to cursor.
 
14
clearBOL :: TermStr s => Capability s
 
15
clearBOL = tiGetOutput1 "el1"
 
16
 
 
17
-- | Clear from cursor to end of line.
 
18
clearEOL :: TermStr s => Capability s
 
19
clearEOL = tiGetOutput1 "el"
 
20
 
 
21
-- | Clear display after cursor.
 
22
clearEOS :: Capability (LinesAffected -> TermOutput)
 
23
clearEOS = fmap ($ []) $ tiGetOutput "ed"
 
24