Commit Graph

241 Commits

Author SHA1 Message Date
Felix Yan
c0d38a16ba
Fix upper bound for random
It was missing in 05b65fc5bc (diff-bbe7cbd3346ad764f4c6f56880116550ee4f4a768d2a578ede1c0ce22b36fb4f)
2021-02-25 03:13:47 +08:00
Jonathan Daugherty
e953272793 Bump version, update changelog 2021-02-22 17:39:10 -08:00
Jonathan Daugherty
309c0e4824
Merge pull request #209 from hapytex/improvement/simplify-color
rewrite the color logic
2021-02-16 13:34:13 -08:00
Willem Van Onsem
9605e5f2fb added test to check equivalence with the old implementation 2021-02-16 22:21:00 +01:00
Jonathan Daugherty
f5b7222065
Merge pull request #196 from lehins/master
Update upper bounds for `random`
2021-02-16 13:07:55 -08:00
Felix Yan
ac3560cc72
Allow microlens 0.4.12
All tests passed here.
2020-12-31 03:06:14 +08:00
Alexey Kuleshevich
05b65fc5bc
Update upper bounds for random 2020-12-05 23:05:04 +03:00
Jonathan Daugherty
d470f5f9d4 Bump version, update changelog 2020-11-08 20:43:37 -08:00
Jonathan Daugherty
63adf9e4db Bump version, update changelog 2020-09-30 15:44:46 -07:00
Jonathan Daugherty
5922c53459 Bump version, update changelog 2020-07-15 12:17:41 -07:00
Jonathan Daugherty
95ea88c814 Bump version, update changelog 2020-07-09 15:17:22 -07:00
Jonathan Daugherty
f7eef975de Bump version, update changelog 2020-03-27 09:14:12 -07:00
Jonathan Daugherty
a0a32ec5fa Depend on semigroups for older GHCs (fixes #185) 2020-03-27 09:12:48 -07:00
Jonathan Daugherty
92590dead1 Bump version, update changelog 2020-03-09 15:37:46 -07:00
Jonathan Daugherty
9a9aeb65ea Bump version, update changelog 2020-03-09 13:40:14 -07:00
Jonathan Daugherty
c204e6dd21 BuildWidthTable: add command-line flag to update Vty config to use new map 2020-03-06 09:29:12 -08:00
Jonathan Daugherty
69dfa280e9 cabal: remove ForeignFunctionInterface from default-extensions 2020-03-05 14:35:44 -08:00
Jonathan Daugherty
ba815c4995 cabal: remove stale comments 2020-03-05 09:23:28 -08:00
Jonathan Daugherty
0bea225b6d Rename vty-build-table to vty-build-width-table, rename main source file 2020-03-05 08:39:16 -08:00
Jonathan Daugherty
74a7c557fb Add support for custom character width table installation
This change introduces a new module,
Graphics.Vty.UnicodeWidthTable.Install, that is responsible for
installing custom unicode width tables into the process. It does so by
allocating memory to hold the table, populating the table's character
ranges with widths from the UnicodeWidthTable, and then marking the
table as ready for use. That causes future calls to 'wcwidth' to consult
the new table rather than relying on the built-in logic to compute
widths.

Note that this functionality breaks the purity of 'wcwidth': 'wcwidth'
calls made before the installation of a custom table may return
different values after the table is installed, despite 'wcwidth' being a
pure function. This choice was made deliberately to simplify the API and
is based on the observation that in practice this will probably never be
an issue.

It's also worth nothing (as is spelled out in the docs, too) that a
custom table installation can only be performed at most once per program
lifetime. Once a custom table installation is performed, it cannot be
undone and no new table can be installed. This, too, is a simplification
based on the assumption that in practice multiple tables will usually
not be required.
2020-03-02 14:05:40 -08:00
Jonathan Daugherty
e271a43a01 Add Graphics.Vty.UnicodeWidthTable.Query to build a unicode width table by querying the terminal on stdin 2020-02-27 15:58:12 -08:00
Jonathan Daugherty
60c55bae3d Add tools/BuildUnicodeTable.hs, a testing program for unicode table API 2020-02-27 15:25:30 -08:00
Jonathan Daugherty
908d189422 Add Graphics.Vty.UnicodeWidthTable.IO to read and write table files 2020-02-27 15:25:08 -08:00
Jonathan Daugherty
345c0bfa64 Add Graphics.Vty.UnicodeWidthTable.Types (data types for unicode width tables) 2020-02-27 15:00:30 -08:00
Jonathan Daugherty
bd8a18c924 Bump version, update changelog 2020-02-27 10:57:05 -08:00
Jonathan Daugherty
4362b3cb1c Add Graphics.Vty.Config.getTtyEraseChar
This commit adds getTtyEraseChar. This function queries the kernel
for the current terminal's settings to obtain the character assigned
by the "stty erase" command. The "erase" character indicates which
input character the terminal should interpret to mean "backspace" when
the terminal is in canonical input mode. Vty applications run with
canonical mode disabled, but even in those cases some users may want
their "stty erase" setting honored by Vty's input-handling so that
incoming erase characters (according to stty) result in "KBS" key events
being delivered to the application.
2020-02-27 09:46:04 -08:00
Jonathan Daugherty
0f08358bd3 Bump version, update changelog 2019-10-01 10:10:30 -07:00
Michael Schröder
dff049003a Add missing MonadFail constraints
Beginning with GHC 8.8, 'fail' is no longer part of the Monad class.
2019-09-18 16:43:43 +02:00
Jonathan Daugherty
3ce0db6a5b
Merge pull request #173 from cjenn/colornote
Clarify documentation for ANSI colors, rename rgbColor to rgbColorToColor240
2019-06-26 09:34:24 -07:00
Artyom Kazak
3caad88a19
Bump microlens bound 2019-06-20 08:52:10 +03:00
Colby Jenn
800336f789 move color documentation to separate module 2019-06-16 13:14:14 -05:00
Jonathan Daugherty
ec7b51eaa7 Bump version, update changelog 2018-11-04 07:40:46 -08:00
Jonathan Daugherty
8f32f8ea4c PictureToSpans: replace specialized lens operators with more fundamental ones
This change removes -~ and +~ definitions that can conflict with those
provided by Microlens, and which were just copies of what Microlens now
provides. Instead of using those, this change just inlines their
functionality in the right spots so that we don't have to conditionally
define or import those operators depending on the version of Microlens,
which just recently started to provide these.

This change also goes ahead and introduces an upper bound on Microlens
to avoid future issues like this.
2018-11-04 07:35:11 -08:00
Jonathan Daugherty
74a72ff59f Bump version, update changelog 2018-10-15 13:38:09 -07:00
Jonathan Daugherty
3ca08b3204 Bump version, update changelog 2018-10-14 20:01:23 -07:00
Jonathan Daugherty
53c02c6516 Bump version, update changelog 2018-09-06 12:36:11 -07:00
Eric Mertens
297a7e7327 Remove unfinished test stub
Fixes #158
2018-07-30 09:41:19 -07:00
Jonathan Daugherty
188cc1a03f
Merge pull request #157 from glguy/travis
update travis build settings
2018-07-29 12:18:47 -07:00
Eric Mertens
47c074d112 update travis build settings 2018-07-29 10:01:47 -07:00
Jonathan Daugherty
bba5f0e36f Bump version, update changelog 2018-07-28 17:54:47 -07:00
Jonathan Daugherty
181a5d77df Bump version, update changelog 2018-07-27 13:32:34 -07:00
Jonathan Daugherty
3a3d6b35a0 Bump version, update changelog 2018-07-12 12:18:46 -07:00
Jonathan Daugherty
6f4edc0228 Bump version, update changelog 2018-03-17 09:42:38 -07:00
Jonathan Daugherty
5d4498faa7 Bump version, update changelog 2018-02-04 15:23:57 -08:00
Ryan Scott
433b5b7f2d Add Semigroup instances 2018-02-04 16:30:29 -05:00
Jonathan Daugherty
9ae2df4d2b Bump version, update changelog 2018-01-05 08:40:00 -08:00
Jonathan Daugherty
86fd269e03 Bump version, update changelog 2017-12-02 22:36:14 -08:00
Jonathan Daugherty
4f5e7422df Bump version, update changelog 2017-10-06 14:15:34 -07:00
Jonathan Daugherty
17cf7a1de0 Bump version, update changelog 2017-10-06 13:07:26 -07:00
Jonathan Daugherty
452ed52069 Bump version, update changelog 2017-09-02 13:25:33 -07:00