Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilgrem committed Feb 7, 2024
1 parent 9ec48d8 commit 6bcbe9f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ansi-terminal-types/stack.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
resolver: lts-22.9 # GHC 9.6.4
snapshot: lts-22.9 # GHC 9.6.4
4 changes: 2 additions & 2 deletions ansi-terminal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Description

['ANSI' terminal escape code](http://en.wikipedia.org/wiki/ANSI_escape_sequences)
support for Haskell, which allows:
- Colored text output, with control over both foreground and background
colors
- Colored text output, with control over foreground, background and (where
supported) underlining colors
- Clearing parts of a line or the screen
- Hiding or showing the cursor
- Moving the cursor around
Expand Down
3 changes: 2 additions & 1 deletion ansi-terminal/src/System/Console/ANSI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ The sequences of control characters (also referred to as \'escape\' sequences or
codes) provide a rich range of functionality for terminal control, which
includes:
* Colored text output, with control over both foreground and background colors
* Colored text output, with control over foreground, background and (where
supported) underlining colors
* Clearing parts of a line or the screen
Expand Down
10 changes: 6 additions & 4 deletions ansi-terminal/src/System/Console/ANSI/Codes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,22 @@ import System.Console.ANSI.Types
-- To represent a paramater value followed by a parameter substring, see
-- 'ParamWithSubs'.
--
-- @since 1.0.1
-- @since 1.1
type Parameter = Int

-- | Type synonym representing parameter elements of a parameter
-- substring. An empty parameter element (which represents a default value for
-- the parameter element) has value 'Nothing'.
--
-- @since 1.0.1
-- @since 1.1
type SubParam = Maybe Int

-- | Type synonym representing parameter values optionally followed by a
-- parameter substring. Parameter substrings were introduced by 13.1.8 of T.416
-- (03/93) for SGR parameter values 38 and 48 and have subsequently been adapted
-- for other uses.
--
-- @since 1.0.1.
-- @since 1.1
type ParamWithSubs = (Parameter, [SubParam])

-- | 'csi' @parameters controlFunction@, where @parameters@ is a list of 'Int',
Expand All @@ -119,7 +119,7 @@ csi = renderCsi show
-- substring. The parameter elements of a parameter substring are separated from
-- the parameter value and each other by \'@:@\'.
--
-- @since 1.0.1
-- @since 1.1
csi' ::
[ParamWithSubs]
-- ^ List of parameters (each of which may be followed by a parameter
Expand Down Expand Up @@ -175,6 +175,8 @@ sgrToCode sgr = case sgrToCode' sgr of

-- | 'sgrToCode'' @sgr@ returns the parameter of the SELECT GRAPHIC RENDITION
-- (SGR) aspect identified by @sgr@.
--
-- @since 1.1
sgrToCode' ::
SGR -- ^ The SGR aspect
-> Either ParamWithSubs [Parameter]
Expand Down
2 changes: 1 addition & 1 deletion ansi-terminal/stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ flags:
ansi-terminal:
example: false
extra-deps:
- ansi-terminal-types-0.11.5@sha256:f78440dfd95c4509e88855ac7cc2d9566ddf956a92c1290404cac93ad1a1b00a,1482
- ansi-terminal-types-1.1@sha256:135f6a381afa19d53d0a3fe40b6dd47e6666c538b09e4300fbb1438759df3248,1462

0 comments on commit 6bcbe9f

Please sign in to comment.