Commit Graph

137 Commits

Author SHA1 Message Date
Ellie Hermaszewska
717e47c953
squash a couple of errors and warnings in the testsuite 2023-05-16 13:15:38 +08:00
Ellie Hermaszewska
1578e3e388
Make interface a little more typesafe with WithUnicode and TabSize 2023-05-16 13:15:38 +08:00
Ellie Hermaszewska
7634d15502
Remove color parameter from tests 2023-05-16 13:15:38 +08:00
Ellie Hermaszewska
21d08763e4
Add functionality to render diagnostics with user provided Docs 2023-05-16 13:15:38 +08:00
Ellie Hermaszewska
559babd1be
Revert "add functionality for Doc messages"
This reverts commit add174dbc07990ea993902bc9bddd6d5b64a6ca3.
2023-05-16 13:15:38 +08:00
Ellie Hermaszewska
92c36532eb
Parameterize Annotation with some other annotation 2023-05-16 13:15:38 +08:00
Ellie Hermaszewska
4270c6e320
add functionality for Doc messages 2023-05-16 13:15:38 +08:00
Ellie Hermaszewska
d06f4c1810
Functor, Foldable, Traversable instances for Report, Marker and Note 2023-05-16 13:15:30 +08:00
Mesabloo
36631e769e fix wrong lower bounds on some dependencies
Fixes #19 and #20
2023-05-13 12:39:02 +02:00
Mesabloo
5df8d9097b update bounds on Aeson
fixes #16
2022-11-05 09:51:04 +01:00
Mesabloo
9e81d90817 switch to v2.4.0 2022-08-15 15:35:24 +02:00
Mesabloo
c8e10f0bc0
Merge pull request #10 from luc-tielen/master
Add helper functions for getting Reports & Markers out of Diagnostics
2022-08-14 15:45:04 +02:00
Luc Tielen
d58752f062 Replace mentions of err/warn with Err/Warn 2022-08-14 15:39:12 +02:00
Luc Tielen
93cd476fa6 Cleanup module export 2022-08-14 15:28:45 +02:00
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