-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toJSONFilter no longer supports non-monad list result #8976
Labels
Comments
See this change. It sure looks like this commit removed a pure instance and added IO. I hadn't noticed that. If so it should be changed! |
@KommuSoft may want to comment. |
Ah, I think the problem was not @KommuSoft's commit but my revision. Will fix. |
jgm
added a commit
to jgm/pandoc-types
that referenced
this issue
Aug 5, 2023
This went missing after my ill-considered revision to #105, commit 183af9d . See jgm/pandoc#8976.
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this issue
Oct 30, 2023
[1.23.1] * Restore toJSONFilter instance for pure `a -> [a]`. This went missing after my ill-considered revision to #105, commit 183af9d9f1066be974ac55fd23a4c985999d3ce8 . See jgm/pandoc#8976. * Generalize ToJSONFilter instance. Previously a pure function `a -> a` could only be promoted to a filter in IO. Now we allow it to work with any instance of MonadIO. (This adds to #105.) * Allow bytestring 0.12. [1.23.0.1] * Allow aeson 2.2. * Remove dependency on string-qq (recbecca skinner).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have been using the following filter on some of my documents. As of pandoc-types 1.23.0.1, this appears to no longer compile:
Error:
After staring a bit at the documentation and source code for
toJSONFilter
, I came to the conclusion that this form is no longer supported and I need to add theIO
monad to unbreak it. And indeed, this works:It's not the most horrible change to need to make to my code, but it is (I think) a breaking change, and can cause users some needless effort, especially because the list form is not clearly demonstrated in the documentation of either the filters page or Hackage for
toJSONFilter
.Versions, etc.:
macOS 13.5
The text was updated successfully, but these errors were encountered: