3 ms·
Reminds me of Edward Kmett's talks on monoidal parsing in which he has Dyck languages as an example. I'm confused about the need for "linear types", unless you
by reuben364 3y ago
Reminds me of Edward Kmett's talks on monoidal parsing in which he has Dyck languages as an example.
I'm confused about the need for "linear types", unless you mean a monoid. I'm not sure of a use case where you would want a open fragment of html or a closed one other than to a have a hole, that is something like
f : HtmlBody -> HtmlBody
f x = someOpenFragment + x + someClosedFragment
- henrydark 3y agoThe example in the reference in the piece is to have a header and a footer, where header would be open and footer closed. As for linear types, I mean that somewhere the type system won't allow progress if you have an open type that wasn't converted to some final state. This is strictly necessary.
- reuben364 3y agoAh, you don't need linear types for that. Linear types will prevent you from duplicating or discarding values, but all you need is to only allow "final state" values to be used in your API. Also a reminder that I should read articles before commenting.
- henrydark 3y agoSorry, auto correct malfunction, I meant "isn't strictly necessary"