From 6bcbe9ff439ca8497f64b0c608c96c0d9203d4f7 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Wed, 7 Feb 2024 00:54:13 +0000 Subject: [PATCH] Update documentation --- ansi-terminal-types/stack.yaml | 2 +- ansi-terminal/README.md | 4 ++-- ansi-terminal/src/System/Console/ANSI.hs | 3 ++- ansi-terminal/src/System/Console/ANSI/Codes.hs | 10 ++++++---- ansi-terminal/stack.yaml | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ansi-terminal-types/stack.yaml b/ansi-terminal-types/stack.yaml index 3a1c428..f218d63 100644 --- a/ansi-terminal-types/stack.yaml +++ b/ansi-terminal-types/stack.yaml @@ -1 +1 @@ -resolver: lts-22.9 # GHC 9.6.4 +snapshot: lts-22.9 # GHC 9.6.4 diff --git a/ansi-terminal/README.md b/ansi-terminal/README.md index fefa3a4..2d01026 100644 --- a/ansi-terminal/README.md +++ b/ansi-terminal/README.md @@ -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 diff --git a/ansi-terminal/src/System/Console/ANSI.hs b/ansi-terminal/src/System/Console/ANSI.hs index e46c991..90bd12a 100644 --- a/ansi-terminal/src/System/Console/ANSI.hs +++ b/ansi-terminal/src/System/Console/ANSI.hs @@ -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 diff --git a/ansi-terminal/src/System/Console/ANSI/Codes.hs b/ansi-terminal/src/System/Console/ANSI/Codes.hs index 1ab0c29..5f9eb3f 100644 --- a/ansi-terminal/src/System/Console/ANSI/Codes.hs +++ b/ansi-terminal/src/System/Console/ANSI/Codes.hs @@ -85,14 +85,14 @@ 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 @@ -100,7 +100,7 @@ type SubParam = Maybe Int -- (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', @@ -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 @@ -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] diff --git a/ansi-terminal/stack.yaml b/ansi-terminal/stack.yaml index f376b51..d2f7a0d 100644 --- a/ansi-terminal/stack.yaml +++ b/ansi-terminal/stack.yaml @@ -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