Abstract
This paper presents the rationale and design of monoid-subclasses. This Haskell library consists of a collection of type classes that generalize the interface of several common data types, most importantly those used to represent strings. We demonstrate that the mathematical theory behind monoid-subclasses can bring substantial practical benefits to the Haskell library ecosystem by generalizing attoparsec, one of the most popular Haskell parsing libraries.
- Alfred V Aho, Brian W Kernighan, and Peter J Weinberger. Awk--pattern scanning and processing language. oftware: Practice and xperience, 9(4):267--79, 1979.Google Scholar
- Mario Blažević. incremental-parser: Generic parser library capable of providing partial results from partial input. Hackage. http://hackage.haskell.org/package/incremental-parser.Google Scholar
- Mario Blažević. monoid-attoparsec: an input-generic fork of attoparsec. Bitbucket. https://bitbucket.org/blamario/monoid-attoparsec.Google Scholar
- Mario Blažević. Coroutine pipelines. The Monad. Reader Issue 19: Parallelism and Concurrency, page 29, 2011.Google Scholar
- Robin Bate Boerop. attoparsec-csv: A parser for csv files that uses attoparsec. Hackage. http://hackage.haskell.org/package/attoparsec-csv.Google Scholar
- Alfred H Clifford and Gordon Bamford Preston. The algebraic theory of semigroups, volume 1. American Mathematical Soc., 1961.Google Scholar
Cross Ref
- Duncan Coutts, Don Stewart, and Roman Leshchinskiy. Rewriting Haskell strings. In Practical Aspects of Declarative Languages, pages 50--64. Springer, 2007. Google Scholar
Digital Library
- David J Farber, Ralph E Griswold, and Ivan P Polonsky. Snobol, a string manipulation language. Journal of the ACM (JACM), 11(1):21--30, 1964. Google Scholar
Digital Library
- Robert Gilmer and Tom Parker. Divisibility properties in semigroup rings. The Michigan Mathematical Journal, 21(1):65--86, 1974.Google Scholar
Cross Ref
- John Goerzen. Listlike: Generic support for list-like structures. Hackage. http://hackage.haskell.org/package/ListLike.Google Scholar
- Ralph E Griswold and Madge T Griswold. The Icon programming language, volume 28. Prentice-Hall Englewood Cliffs NJ, 1983. Google Scholar
Digital Library
- Thomas Harper. Stream fusion on Haskell unicode strings. In Implementation and Application of Functional Languages, pages 125--140. Springer, 2011. Google Scholar
Digital Library
- Paul Hudak, John Hughes, Simon Peyton Jones, and Philip Wadler. A history of Haskell: being lazy with class. In Proceedings of the third ACM SIGPLAN conference on History of programming languages, pages 12--1. ACM, 2007. Google Scholar
Digital Library
- Oleg Kiselyov. iteratee: Iteratee-based i/o. Hackage. http://hackage.haskell.org/package/iteratee.Google Scholar
- Oleg Kiselyov. Iteratees. In Proceedings of the 11th international conference on Functional and Logic Programming, pages 166--181. Springer-Verlag, 2012. Google Scholar
Digital Library
- Daan Leijen and Erik Meijer. Parsec: Direct style monadic parser combinators for the real world. Technical report, Department of Computer Science, Utrecht University, 2001.Google Scholar
- Bryan O'Sullivan. attoparsec: Fast combinator parsing for bytestrings. Hackage. http://hackage.haskell.org/package/attoparsec.Google Scholar
- Bryan O'Sullivan. criterion: Robust, reliable performance measurement and analysis. Hackage. http://hackage.haskell.org/package/criterion.Google Scholar
- Maciej Piechotka. nanoparsec: An implementation of attoparsec-like parser around list-like. Hackage. http://hackage.haskell.org/package/nanoparsec.Google Scholar
- Larry Wall et al. The Perl programming language, 1994.Google Scholar
Index Terms
Adding structure to monoids: thus hopefully ending Haskell's string type confusion
Recommendations
Adding structure to monoids: thus hopefully ending Haskell's string type confusion
Haskell '13: Proceedings of the 2013 ACM SIGPLAN symposium on HaskellThis paper presents the rationale and design of monoid-subclasses. This Haskell library consists of a collection of type classes that generalize the interface of several common data types, most importantly those used to represent strings. We demonstrate ...
Binders unbound
ICFP '11: Proceedings of the 16th ACM SIGPLAN international conference on Functional programmingImplementors of compilers, program refactorers, theorem provers, proof checkers, and other systems that manipulate syntax know that dealing with name binding is difficult to do well. Operations such as α-equivalence and capture-avoiding substitution ...
Binders unbound
ICFP '11Implementors of compilers, program refactorers, theorem provers, proof checkers, and other systems that manipulate syntax know that dealing with name binding is difficult to do well. Operations such as α-equivalence and capture-avoiding substitution ...







Comments