From: Nick Yakimov <g.livid-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Release road map - 1.14 and beyond
Date: Fri, 30 Oct 2015 11:04:44 -0700 (PDT) [thread overview]
Message-ID: <7e68bb74-ba2c-4d4f-92c7-ec4c60dfea09@googlegroups.com> (raw)
In-Reply-To: <32e7774a-9532-497b-baa5-4d8730ddfb7e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 2165 bytes --]
What about making key-value part of `Attr` into something like `MetaValue`?
E.g., from the top of my head,
```haskell
data Attr = Attr { attrId :: String
, attrClasses :: [String]
, attrKVs :: [(String, AttrValue)]
}
deriving (...)
```
`AttrValue` could be a simple type with several constructors, or maybe an
existential type (something like `Data.Dynamic`? sorry, I'm not good enough
with Haskell to determine if that would be viable)
I also still maintain that basically everything (all `Block`s and
`Inline`s) could have `Attr` attached. From generality point of view, this
is sound (somewhat). Implementation can be a horrific nightmare though.
Pattern synonyms might alleviate some pains. One case where this
immediately seems useful is matching source lines to output (something I've
been thinking about lately) -- reader could store auxiliary line numbers in
this "universal Attr".
One option for generalising `Attr`, that seems somewhat reasonable, is
defining wrappers for `Block` and `Inline`, e.g. with another type ctor:
```haskell
data Block =
...
| BlockAttr Attr Block
...
```
Or maybe with a type like
```haskell
data AttrWrapper = BlockAttr Attr Block | InlineAttr Attr Inline
```
First option would probably require fewer changes to readers/writers, but
somehow seems less "correct".
Again, pattern synonyms can alleviate some of the pains here.
P.S. This all is not as well thought-through as I'd like to, so treat this
as a stream of consciousness.
--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7e68bb74-ba2c-4d4f-92c7-ec4c60dfea09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 3056 bytes --]
next prev parent reply other threads:[~2015-10-30 18:04 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-03 17:05 John MacFarlane
[not found] ` <20150403170528.GA171-jF64zX8BO082Zs7wWoiTUGZHpeb/A1Y/@public.gmane.org>
2015-04-03 17:28 ` Joseph Reagle
[not found] ` <551ECDD2.5050606-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
2015-04-03 19:40 ` Matthew Pickering
[not found] ` <CALuQ0m-p2mS+cenBOVpG5OE3+wtKmB2uadYy1ZJzFFqYNy-tag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-03 20:00 ` John MacFarlane
2015-04-07 2:15 ` Andrew Dunning
[not found] ` <657d0ad0-c97a-40bb-b50e-c4676de65e89-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-04-07 3:26 ` John MacFarlane
[not found] ` <20150407032620.GB44880-bi+AKbBUZKbivNSvqvJHCtPlBySK3R6THiGdP5j34PU@public.gmane.org>
2015-04-07 23:42 ` daniel
2015-04-05 10:49 ` Nick Yakimov
2015-05-24 12:59 ` mb21
[not found] ` <2e314761-d731-4104-9e68-fbbd87bb901b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-05-27 22:37 ` John MacFarlane
2015-05-26 1:14 ` insanemole
2015-06-04 10:44 ` Tim St. Clair
2015-07-24 19:53 ` mb21
2015-07-26 18:22 ` mb21
[not found] ` <7c361579-6858-4b3d-a24d-814ac2c9a7cc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-07-26 18:37 ` Nikolay Yakimov
[not found] ` <CA+hqrpWPvSgwKjwUphBv9-hKrxxhpbLk66Wg8STB=XkAREo-7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-26 18:56 ` Pablo Rodríguez
[not found] ` <55B52D51.8010309-S0/GAf8tV78@public.gmane.org>
2015-07-27 16:24 ` John MacFarlane
[not found] ` <20150727162402.GC27705-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
2015-07-27 18:24 ` BP Jonsson
2015-07-27 18:31 ` BP Jonsson
[not found] ` <55B67911.3020007-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-07-27 20:04 ` mb21
[not found] ` <4663f0c6-7e25-41ac-bb1e-b174639ea010-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-07-27 21:28 ` Tim St. Clair
[not found] ` <134301db-83b8-4a95-a550-8cf46eb10f0b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-07-27 21:56 ` BP Jonsson
[not found] ` <55B6A91D.3010901-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-07-27 22:04 ` BP Jonsson
2015-07-28 7:12 ` mb21
[not found] ` <ac3237e2-c984-4360-a3f2-4c1ff883ff4a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-07-30 16:42 ` mb21
[not found] ` <408eafa7-541e-4fb4-ade8-93cc0597c095-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-08-06 19:57 ` John MacFarlane
[not found] ` <20150806195701.GE4492-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
2015-08-07 13:54 ` mb21
[not found] ` <c0450ce6-34ad-4f31-b142-62f6fc49bf29-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-08-07 19:23 ` Pablo Rodríguez
2015-10-25 19:12 ` mb21
[not found] ` <32e7774a-9532-497b-baa5-4d8730ddfb7e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-10-30 18:04 ` Nick Yakimov [this message]
[not found] ` <7e68bb74-ba2c-4d4f-92c7-ec4c60dfea09-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-10-30 18:07 ` Nikolay Yakimov
[not found] ` <CA+hqrpX-6SPW3cnKv09zf9B06NQHkaM8UPag5Jt=5xtBGzJp7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-31 12:34 ` mb21
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=7e68bb74-ba2c-4d4f-92c7-ec4c60dfea09@googlegroups.com \
--to=g.livid-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=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).