From: "'Guillem Marpons' via pandoc-discuss" <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Announcing asciidoc-hs, an AsciiDoc parser in Haskell
Date: Fri, 18 Jun 2021 19:29:28 +0200 [thread overview]
Message-ID: <affe5bc0-6627-6edd-48a7-7863c13529c3@mailbox.org> (raw)
In-Reply-To: <m21r8z14wp.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
El 18/6/21 a las 19:03, John MacFarlane escribió:
> "'Guillem Marpons' via pandoc-discuss"
>> El 16/6/21 a las 17:01, John MacFarlane escribió:
>>
>> Now, is there some example of reader implemented as external library
>> that needs access to included files? It seems to me that the easiest way
>> for a library to integrate with PandocMonad would be to put the class in
>> a different package that the library (asciidoc-hs in this case) could
>> have as a dependency. Is there another way? What I understand is that
>> readCommonMark[Body] calls to a pure parser defined in package
>> commonmark, am I right? But it's not possible for the AsciiDoc parser to
>> be pure.
>
> One idea would be to use a custom typeclass instead of using
> MonadIO. Something a bit like PandocMonad, with a pure instance
> and an IO instance. Say you call it AsciidocMonad. Then hooking
> up your library to pandoc would just be a matter of defining
>
> instance AsciidocMonad m => PandocMonad m
>
Yes, this could work. Most of the functionality in
AsciidocMonad/PandocMonad instances will be replicated, and in the long
run we could look for different package boundaries that avoid the
redundancy. But for now I think it's a good starting point and a
feasible path for integration. Thanks!
--
Guillem
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/affe5bc0-6627-6edd-48a7-7863c13529c3%40mailbox.org.
prev parent reply other threads:[~2021-06-18 17:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-16 14:15 'Guillem Marpons' via pandoc-discuss
[not found] ` <1cee20e4-c8f5-9f6f-9903-a2ae35c1dc28-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2021-06-16 15:01 ` John MacFarlane
[not found] ` <m2fsxh3lb6.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
2021-06-17 10:58 ` 'Guillem Marpons' via pandoc-discuss
[not found] ` <c4d2a88d-2edc-ef8c-5db4-dcf87353d634-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2021-06-18 17:03 ` John MacFarlane
[not found] ` <m21r8z14wp.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
2021-06-18 17:29 ` 'Guillem Marpons' via pandoc-discuss [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=affe5bc0-6627-6edd-48a7-7863c13529c3@mailbox.org \
--to=pandoc-discuss-/jypxa39uh5tlh3mbocffw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).