Commit Graph

123 Commits

Author SHA1 Message Date
Luc Tielen
87240690e5 Replace uses of err/warn with Err/Warn 2022-08-14 15:28:35 +02:00
Luc Tielen
c88eaec6c7 Update README 2022-08-14 15:12:23 +02:00
Luc Tielen
9e3f65b925 Add docs to Warn and Err patterns 2022-08-14 15:11:07 +02:00
Luc Tielen
2ac7dd331b Fix deprecation warnings in test suite 2022-08-14 15:07:47 +02:00
Luc Tielen
ba5f1a4950 Add Warn and Err pattern synonyms for Report 2022-08-14 15:03:52 +02:00
Luc Tielen
b40f573a0a Add helper functions for getting Reports & Markers out of Diagnostics 2022-08-14 13:20:00 +02:00
Mesabloo
f8badb4d8c fix small bug 2022-08-05 15:17:25 +02:00
Mesabloo
c9114b0634 switch to v2.3.0 2022-08-05 14:01:47 +02:00
Mesabloo
87f7593bee add some utilities functions 2022-08-05 14:00:45 +02:00
Mesabloo
7650b2d020 create new tests 2022-07-23 09:55:58 +02:00
Mesabloo
87de51ac93 allow inserting invisible markers 2022-07-23 09:53:32 +02:00
Mesabloo
5d831d4c7b switch to v2.2.0 2022-07-15 09:25:55 +02:00
Mesabloo
c8f855325c show 'end of line' token when converting from parsec error 2022-07-15 09:24:37 +02:00
Mesabloo
5414562720
Merge pull request #8 from JaSpa/perf-improvements
Performance improvements
2022-07-03 18:12:40 +02:00
Janek Spaderna
7ba6171305 Store a file's lines in an array
Accessing a single line in `getLine_` using `List.safeIndex` takes O(n)
time with n being the number of lines. Overall this results in O(n^2)
time for formatting a diagnostic. By using an array we cut the overall
time down to O(n).
2022-07-01 18:28:43 +02:00
Janek Spaderna
4d12cc8236 Calculate character widths per line in array
Using an unboxed array has better performance than using a
`HashMap Int Int`: although both data structures support O(1) access,
the array has a better constant factor.

Additionally, an array is suited very well since we we have a character
width for every index i in [1..n].
2022-07-01 18:25:31 +02:00
Janek Spaderna
f4863dd3e8 Collect reports in a difference list
Using a difference list we get O(1) appending vs. O(n) with the built-in
list type. Overall for n reports this results in O(n) operations instead
of O(n^2) operations.
2022-07-01 18:23:55 +02:00
Mesabloo
d1e552c09a switch to v2.1.1 2022-06-26 14:58:55 +02:00
Mesabloo
b53a8377a4 fix compatibility layers 2022-06-26 14:55:07 +02:00
Mesabloo
5042217e58 allow distinguishing between notes and hints at the bottom of a report 2022-06-26 14:20:21 +02:00
Mesabloo
770d8871db switch to v2.0.1 2022-06-26 11:01:31 +02:00
Mesabloo
8651d5f9b2 fix order of multiline markers when printing 2022-06-26 10:58:50 +02:00
Mesabloo
ccb2ba03cd fix alignment of marker message 2022-06-26 10:58:50 +02:00
Mesabloo
17d1e026b5 first try handling multiline text marker messages 2022-06-26 10:58:49 +02:00
Janek Spaderna
73c2f2b1fb
Fix Haddock markup (#7) 2022-06-26 09:07:49 +02:00
Mesabloo
927cdcb9fd switch to version 2.0.0 2022-05-06 18:18:33 +02:00
Mesabloo
bb0028ff1c fix main documentation 2022-05-03 17:35:37 +02:00
Mesabloo
75816d465c fix various documentation issues 2022-05-03 17:32:24 +02:00
Mesabloo
da0ccd5933 document how to create new styles 2022-05-03 12:54:25 +02:00
Mesabloo
e777f6bb68 introduce styles 2022-05-03 12:21:05 +02:00
Mesabloo
8f17e4caec change tests to accomodate for #6 2022-05-03 11:29:43 +02:00
Mesabloo
82b18d4cba fix #6 2022-05-03 11:12:25 +02:00
Mesabloo
b7f077f103 publish v1.9.0 2022-05-02 15:13:57 +02:00
Mesabloo
8b4d8b45f8 export 'prettyDiagnostic' as per #5 2022-05-02 15:11:02 +02:00
Mesabloo
c6cf60ccca switch to version 1.8.2 2022-04-29 23:26:15 +02:00
Mesabloo
85667b406d replace ellipsis with single dot 2022-04-29 23:25:11 +02:00
Mesabloo
49b1a7b41e document new function 2022-04-29 23:20:15 +02:00
Mesabloo
4528b2182a output multiline markers at end of line
This prevent multiline markers from being disconnected and output at the bottom, plus it looks better
2022-04-29 23:13:05 +02:00
Mesabloo
4bf231c4ed put dependency on 'text' only in tests 2022-04-29 22:27:33 +02:00
Mesabloo
de9486783e color lines in between bounds of multiline markers 2022-04-29 16:02:05 +02:00
Mesabloo
a555301e4e fix wrong position inserted at top of report
This should have been the position of the first 'This' marker
2022-04-27 08:38:34 +02:00
Mesabloo
a9b5b73c8e insert correct version bounds for 'wcwidth' 2022-04-27 00:32:13 +02:00
Mesabloo
9bf1277414 update feature list 2022-04-27 00:28:02 +02:00
Mesabloo
328ef398e7 update documentation for TAB size 2022-04-27 00:26:12 +02:00
Mesabloo
e75195cbb8 handle variable width characters using wcwidth 2022-04-26 23:58:43 +02:00
Mesabloo
cadfd11a28 add support for tabs 2022-04-26 23:28:01 +02:00
Mesabloo
a8d77f4b79 switch to latest GHC 8.10.7 LTS 2022-04-26 15:09:41 +02:00
Mesabloo
baf3c56ff8 remove empty expected messages 2022-04-23 05:11:10 +02:00
Mesabloo
488c3a6a4d remove duplicate unexpected messages with parsec
This fixes issue #2, where unexpected markers have been found to be duplicated
2022-04-23 05:09:36 +02:00
Mesabloo
eb980bd51c fix documentation for parsing libraries compatibility layers 2022-04-22 22:04:39 +02:00