packages feed

ansi-terminal-types 0.11.5 → 1.1

raw patch · 3 files changed

+35/−15 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ System.Console.ANSI.Types: CurlyUnderline :: Underlining
+ System.Console.ANSI.Types: DashedUnderline :: Underlining
+ System.Console.ANSI.Types: DottedUnderline :: Underlining
+ System.Console.ANSI.Types: Underlining :: ConsoleLayer

Files

CHANGELOG.md view
@@ -1,6 +1,13 @@ Changes
 =======
 
+Version 1.1
+--------------
+
+* Add `Underlining` constructor to type `ConsoleLayer`.
+* Add `CurlyUnderline`, `DottedUnderline`, and `DashedUnderline` constructors to
+  type `Underlining`.
+
 Version 0.11.5
 --------------
 
ansi-terminal-types.cabal view
@@ -1,6 +1,6 @@+Cabal-Version:       1.22
 Name:                ansi-terminal-types
-Version:             0.11.5
-Cabal-Version:       >= 1.10
+Version:             1.1
 Category:            User Interfaces
 Synopsis:            Types and functions used to represent SGR aspects
 Description:         The \'ANSI\' standards refer to the visual style of
@@ -26,8 +26,8 @@ Library
         Hs-Source-Dirs:         src
         Exposed-Modules:        System.Console.ANSI.Types
-        Build-Depends:          base >= 4.3.0.0 && < 5
-                              , colour >=2.1.0
+        Build-Depends:          base >= 4.8.0.0 && < 5
+                              , colour >= 2.1.0
         Default-Extensions:     CPP
         Ghc-Options:            -Wall
         Default-Language:       Haskell2010
src/System/Console/ANSI/Types.hs view
@@ -1,15 +1,12 @@-#if __GLASGOW_HASKELL__ >= 704
 {-# LANGUAGE Safe #-}
-#elif __GLASGOW_HASKELL__ >= 702
-{-# LANGUAGE Trustworthy #-}
-#endif
 
 {-| The \'ANSI\' standards refer to the visual style of displaying characters as
-their \'graphic rendition\'. The style includes the color of a character or its
-background, the intensity (bold, normal or faint) of a character, or whether the
-character is italic or underlined (single or double), blinking (slowly or
-rapidly) or visible or not. The \'ANSI\' codes to establish the graphic
-rendition for subsequent text are referred to as SELECT GRAPHIC RENDITION (SGR).
+their \'graphic rendition\'. The style includes the color of a character, its
+background, or (where supported) its underlining; the intensity (bold, normal or
+faint) of a character; or whether the character is italic or underlined (single,
+double, curly, dotted or dashed), blinking (slowly or rapidly) or visible or
+not. The \'ANSI\' codes to establish the graphic rendition for subsequent text
+are referred to as SELECT GRAPHIC RENDITION (SGR).
 
 This module exports types and functions used to represent SGR aspects. See also
 'System.Console.ANSI.setSGR' and related functions provided by the
@@ -58,10 +55,14 @@   | Vivid
   deriving (Bounded, Eq, Enum, Ix, Ord, Read, Show)
 
--- | ANSI colors can be set on two different layers
+-- | ANSI colors can be set on three different layers
 data ConsoleLayer
   = Foreground
   | Background
+  | Underlining
+    -- ^ Not widely supported.
+    --
+    -- @since 1.1
   deriving (Bounded, Eq, Enum, Ix, Ord, Read, Show)
 
 -- | ANSI blink speeds: values other than 'NoBlink' are not widely supported
@@ -74,8 +75,20 @@ -- | ANSI text underlining
 data Underlining
   = SingleUnderline
-  -- | Not widely supported. Not supported natively on Windows 10
   | DoubleUnderline
+    -- ^ Not widely supported.
+  | CurlyUnderline
+    -- ^ Not widely supported.
+    --
+    -- @since 1.1
+  | DottedUnderline
+    -- ^ Not widely supported.
+    --
+    -- @since 1.1
+  | DashedUnderline
+    -- ^ Not widely supported.
+    --
+    -- @since 1.1
   | NoUnderline
   deriving (Bounded, Eq, Enum, Ix, Ord, Read, Show)