Mesabloo
d3ffbb7f37
Merge pull request #24 from byorgey/remove-text
...
remove `text` dependency
2023-10-19 10:01:14 +02:00
Brent Yorgey
9488f94222
remove text
dependency
...
`text` is only required for the `diagnose-megaparsec-tests` and
`diagnose-parsec-tests` test suites.
2023-10-17 13:16:53 -05:00
Mesabloo
0f17c071d0
fix removal of 'def' in all modules
2023-07-05 18:12:00 +02:00
Mesabloo
2a16c8e74a
Merge pull request #22 from expipiplus1/instances
...
Remove suspicious instances + some new ones
2023-07-05 17:24:24 +02:00
Ellie Hermaszewska
396ed088ad
Remove redundant import
2023-06-03 09:07:12 +08:00
Sophie Taylor
6db4f61596
Add instances for Error.Diagnose.Style
2023-06-03 09:07:11 +08:00
Ellie Hermaszewska
451d9838cf
Functor, Foldable, Traversable instances for Report, Marker and Note
2023-06-03 09:06:17 +08:00
Ellie Hermaszewska
e4bc1849e5
Derive Eq and Ord for Marker
2023-06-03 09:06:17 +08:00
Ellie Hermaszewska
9ced23674f
Replace Default instance for Diagnostic with Monoid
2023-06-03 09:06:17 +08:00
Ellie Hermaszewska
e5145b67c5
Functor instances for Report, Marker and Note
2023-06-03 09:06:17 +08:00
Mesabloo
26266751bc
Merge pull request #21 from expipiplus1/doc-message
...
Add functionality to render diagnostics with user provided Docs
2023-06-02 21:01:02 +02:00
Ellie Hermaszewska
df6a339789
Correct usage example in readme
2023-05-30 21:19:47 +08:00
Ellie Hermaszewska
3a99b70403
Correct behaviour of Nesting
2023-05-22 22:29:38 +08:00
Ellie Hermaszewska
604f083fa1
squash warnings
2023-05-16 17:14:57 +08:00
Ellie Hermaszewska
e62d09c599
Fix nested user strings and add test
2023-05-16 15:33:49 +08:00
Ellie Hermaszewska
7838253a7a
Add Eq and Ord instances to Note
2023-05-16 14:26:31 +08:00
Ellie Hermaszewska
1df98d31b6
Bump version to reflect breaking changes
2023-05-16 13:27:14 +08:00
Ellie Hermaszewska
423b07e654
Add a couple of tests for user Doc rendering
2023-05-16 13:16:35 +08:00
Ellie Hermaszewska
0a5ea41207
Functor Foldable Traversable instances for Annotation
2023-05-16 13:15:38 +08:00
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