560 blogs tracked4,950 posts indexed

#zippers

5 posts · 1 company · newest first

2

Solving Advent of Code “Seating System” with Comonads and Stencils (opens on the source site)

In this post, we solve the Advent of Code 2020 “Seating System” challenge in Haskell using comonads and stencils. This post was originally published on abhinavsarkar.net. This post is a part of the series: Solving Advent of Code. “Handy Haversacks” in Type-level Haskell “No Space Left On Device” with Parsers, Zippers and Interpreters “Rock-Paper-Scissors” in Type-level Haskell “Aplenty” by Compiling “Seating System” with Comonads and Stencils 👈 Contents The Challenge The Cellular Automaton The Solution The Zipper The Comonad The Array The Stencil The Challenge# Here’s a quick summary of the…

haskellpuzzlesexcerpt only · body stays at the source
From the web
4

JSON Parsing from Scratch in Haskell: Error Reporting—Part 2 (opens on the source site)

In the previous post, we set out to rewrite the JSON parser we wrote in Haskell in an earlier post, to add support for error reporting. The parser was written very naively: if it failed, it returned nothing. You couldn’t tell what the failure was or where it happened. That’s OK for a toy parser but error reporting is an absolute must requirement for all good parsers. In the previous post, we finished writing the basic framework for the same. In this post, we’ll finish adding simple but useful error reporting capability to our JSON parser.

parsersjsonexcerpt only · body stays at the source
From the web
5

JSON Parsing from Scratch in Haskell: Error Reporting—Part 1 (opens on the source site)

In the previous post we wrote a simple but correct JSON parser in Haskell. The parser was written very naively: if it failed, it returned nothing. You couldn’t tell what the failure was or where it happened. That’s OK for a toy parser but error reporting is an absolute must requirement for all good parsers. So in this post and next post, we’ll add simple but useful error reporting capability to our JSON parser.

parsersjsonexcerpt only · body stays at the source
From the web
5 shown

Privacy choices

Reading never requires analytics. These choices last 90 days on this browser.

Essential sign-in and security storage always stays on. Read the privacy notice.