Some people have requested my slides from the short talk I gave about monoids and monoidal parsing at Hac Phi. So, here they are.
There will be more to come at the next Boston Haskell User Group in August, where it looks like I'll be giving two short talks covering monoids. I may use the monoidal parsing engine from Kata as an example for the advanced talk if I have time and will start to cover parsing larger classes of grammars in general (regular languages, CFGs/TIGs, TAGs, PEGs, LALR, attribute-grammars, etc.)
Discussion
Hi, do you have a working code example for the file position example? I get following error:
@Stulli
Look on hackage at any revision of monoids before 0.2.0, and it will contain
Data.Monoid.Lexical.SourcePosition— I recently slimmed the package down and plan to move the remaining functionality into a monoid-extras style package so that the core functionality is available without a laundry list of dependencies.Your kind error comes from the fact that when I added
Pos, I added an argument to the type to make it aPointedFunctor. So you need to makeMonoid (SourcePosition f)andReducer Char (SourcePosition f).I explained the extra argument as part of the narrative during the talk, but naked slides do not provide me such opportunity for elaboration. :)