From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28656 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Announcing asciidoc-hs, an AsciiDoc parser in Haskell Date: Fri, 18 Jun 2021 10:03:34 -0700 Message-ID: References: <1cee20e4-c8f5-9f6f-9903-a2ae35c1dc28@mailbox.org> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38385"; mail-complaints-to="usenet@ciao.gmane.io" To: 'Guillem Marpons' via pandoc-discuss , pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBB5FDWODAMGQE3TP4EAQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jun 18 19:03:50 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f57.google.com ([209.85.210.57]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1luHuI-0009kq-9m for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 18 Jun 2021 19:03:50 +0200 Original-Received: by mail-ot1-f57.google.com with SMTP id v9-20020a0568301bc9b02904494d2869f2sf5391783ota.20 for ; Fri, 18 Jun 2021 10:03:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1624035829; cv=pass; d=google.com; s=arc-20160816; b=MgCbohW1gn5QTk7P9vE4huDyi9SdN6IPiJkNTHnjlg1MQRdotc5kjz3Hyz2Ticmgxw duKz+wV4Egk4lryXd9LDpIKucHIhUSsqm2bubRTZK/G27vkv+rrD/+TjBl6t6BCZKk7Y 7HVAT/GpAJxkt3Xaz4oo3qq3mWfbsvfp+j9WrS9i6E9j/NAS6K4C8IafjnnIfRBfyaJw TbaFPEbKgoASXLA/ocd2W47dLepYkGl6ZcjKpEVL49IhL8JPmgbC4qNZLUnpfVXlj9aD 4+xSFe4GHay5qS6Mncs8LiIEB9OpZQdDhDVOl+ojYhT+TVwhJZPx30Ab9FDQEMEhpTrW d7dQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:content-transfer-encoding :mime-version:message-id:date:references:in-reply-to:subject:to:from :sender:dkim-signature; bh=5/OjlikqxoUHB/P/iPsrprKTjjKrAdfGwCUvY8hEqwI=; b=R9MZH42I7bWVbhHDxGgYD0KtpKjGycRzlFlJxgoY1Rj//m8rSKYaW4Xa7vSWkfPsog mfDsUdGlb21oeljt71m2Pa6b0dmMpDY769B8QDXjP1s4klmTfUkIhbxUQXZMfuedwxEs +E3qmt96m1SEzGIRF7tsIRxCzpHookx5RAylPh9t+VWJYdYAzTJjs9yy3KV5D+QxRnlC s7ZP8FeEMiqIzWNqp7b1hYoJuw9BvIFACIdmuxNuq5/ru8mzq/8K18UNqtSdVFEi6ZPf CAuPW1ltyUKsweBiFZpK9Mh2XWCu158KjDK+t1yPHukQsvHPhHzVYRzOVSkKbBtiac4Y Nftg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=IdD9fhjD; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::434 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=5/OjlikqxoUHB/P/iPsrprKTjjKrAdfGwCUvY8hEqwI=; b=NDqqhbAwJWThjHtGxq7C4Isp/6We0bcwGSyVb6CO3LjJ4iLJMZROXJLC6igwDaYGTz 6MMdkXFNGh/zGhDOEW0hNavU3CMkJ3K3M5El0DAbreKh2WBH610v/9cnS3SlfUqhFTfX 80OC1anH+RbQ/bx8HV34z4ScsNudJluhbk+tDyMY3pvZRr7xkyIdRYvJWp6jPiZGBH2i 5UhXrAjLwt8IPRsNV07y9Ci74xYDBAqFJeAV6keuopNVddx4exhQ4o1VNhWgywjmz4NF BSbJ3R0k7OKkE/hJMPvi3i9dJzYg6LYh25HimQqA74vmDf94Vs//56mKq0blxhi8ET3p TXHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:content-transfer-encoding :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=5/OjlikqxoUHB/P/iPsrprKTjjKrAdfGwCUvY8hEqwI=; b=ffLthCMJMjvJvBz+laQNCaaxxbs4/pL+q+QqO2+CvfkyN5KtxOhtqfQL908xczwUz4 Rzaud8w3QEZ8yFCPR9TVA1xM83dFDTkA97x8Wt9SlLtjcq8yY5B4m/pSUbDx68tFsSA0 0O9RROcvcPUUxzRnKX3WfOHBLEKjp/CAQxXqodDeD2SZ4dyAnbYY5iKMLl+5KtUucPEx NgXx+5hYdllx1Z18P71TKY2gpNDn0//AXDy7rw5czGV4DfKDyirzIZAS/Tn7YrmX6fuN 62kLJawDTXTrnGqpTBlRLa5I0x3BIGT8ueyVKsDVTs8T4ZqIH4a4aYpsIm9t9stwVhj0 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532HLnnEY4PlP3braKYS+fYZkenuHsKBBcOnoefngrRDVViLVi2u d6lpIoTaSSscAdqwfyuQ0ro= X-Google-Smtp-Source: ABdhPJxcm+GaHKr3kWb1TUv/a0U6o5i26C8fnx1li3SlGSfJXCAW+QxXblVC/0IpUU5YSj+arljXFg== X-Received: by 2002:aca:fd44:: with SMTP id b65mr15520237oii.175.1624035829284; Fri, 18 Jun 2021 10:03:49 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:5754:: with SMTP id l81ls3182598oib.9.gmail; Fri, 18 Jun 2021 10:03:47 -0700 (PDT) X-Received: by 2002:aca:5c04:: with SMTP id q4mr7798938oib.11.1624035827848; Fri, 18 Jun 2021 10:03:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624035827; cv=none; d=google.com; s=arc-20160816; b=Oz5+J8ew0N3iYF/T6hxa0JEeiUawMdtIrm0SO+cx2omipUt/zi39s7GOrZFYZwhwnA ecbogoXpggXaRZADslSyZ3p741UhVk1TGRyrXrZDhAm/ZOMxhTCLt3y327WqRKHe0NV+ gjkl5AV5m7Q7+GSvKH/wFsG1wOpw8DfhOnwgzZMuJ4q6O1eyRduolgB9MKyo2TZh246B 475YqhkmI4LHOfqqYnoAom35r+zvfmhGhjgaVmMm86xt0O7PUfHKUDmyyf0o2go8eHHG //EbnHf4V75H8bxGXrhJ0RdkOW4nTItY0sJav97M6hzM7nybrmZrwWsRUGnWdwqZN2MO PX7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:dkim-signature; bh=/5jGYcrqZtPPzpbCR4ajs9r+RMQ0AjCZqd1/2ePWxPM=; b=Hsa/mzQH9z/Pf8DqPU05844sbuvbnP63BQPOr9BvIaqYEZMPCAn0I5uicbteqSjOVz /oJw4WsGPnz7SFbXEhkeFJN3UgUAmeTEYCdEbvuTDSPzcYi2xcGjSmxjVyZlh+ITcn+7 CRxWShlVFfTK05bhM0auNPMvsKHGTS7uvYlDH2xHpaNMmWHxyeLinBlMFvOOTlwXkkC+ mGiDan0D+CyC1A+T5Go3PmLHCcuwg4NEaUWaNfXjnNYr5b0LegWdtZeR0sLMIkVjNjlk J/qLtuufGeJS64pZGNKiNuSZXAreImxfdZ8WKKybo5DlDekhh1sIdHGsKtUvPx5NseG0 qcfg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=IdD9fhjD; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::434 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com. [2607:f8b0:4864:20::434]) by gmr-mx.google.com with ESMTPS id u128si975102oif.2.2021.06.18.10.03.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Jun 2021 10:03:47 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::434 as permitted sender) client-ip=2607:f8b0:4864:20::434; Original-Received: by mail-pf1-x434.google.com with SMTP id y15so2303277pfl.4 for ; Fri, 18 Jun 2021 10:03:47 -0700 (PDT) X-Received: by 2002:a05:6a00:b83:b029:2ec:7400:ae59 with SMTP id g3-20020a056a000b83b02902ec7400ae59mr6227086pfj.11.1624035826636; Fri, 18 Jun 2021 10:03:46 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id s22sm9030689pfd.94.2021.06.18.10.03.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 10:03:45 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id B1C89A23E; Fri, 18 Jun 2021 13:03:34 -0400 (EDT) In-Reply-To: X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=IdD9fhjD; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::434 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:28656 Archived-At: "'Guillem Marpons' via pandoc-discuss" > El 16/6/21 a las 17:01, John MacFarlane escribi=C3=B3: >>=20 >> One issue concerns includes. The pandoc readers are >> parameterized on any instance of PandocMonad, so they can be >> run either "pure" or in an IO context. PandocMonad provides >> an abstraction for reading from the file system -- an ersatz >> file system is used in "pure" instances. >>=20 >> So, for purposes of eventual integration in pandoc, it would be >> great if your library was compatible with this (rather than, >> e.g., exporting a parser that requires MonadIO). > > I'm more than willing to make the changes needed to integrate with=20 > Pandoc-the-tool, when time arrives, and start planing for it. In fact,=20 > it seems that PandocMonad implements a lot of the functionality needed=20 > for AsciiDoc include/image/whatever expansion. > > Now, is there some example of reader implemented as external library=20 > that needs access to included files? It seems to me that the easiest way= =20 > for a library to integrate with PandocMonad would be to put the class in= =20 > a different package that the library (asciidoc-hs in this case) could=20 > have as a dependency. Is there another way? What I understand is that=20 > readCommonMark[Body] calls to a pure parser defined in package=20 > commonmark, am I right? But it's not possible for the AsciiDoc parser to= =20 > 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 =3D> PandocMonad m --=20 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 e= mail 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/m21r8z14wp.fsf%40MacBook-Pro-2.hsd1.ca.comcast.net.