@hackage Shpadoinkle-backend-pardiff0.3.0.1

A Virtual Dom in pure Haskell, based on Html as an Alignable Functor.

Shpadoinkle Backend ParDiff

Goldwater Haddock BSD-3 built with nix Hackage Hackage Deps Hackage CI

Shpadoinkle's ParDiff backend is a virtual dom diffing system written in pure Haskell. It currently serves as the canonical backend for Shpadoinkle, such that the behavior of other backends should conform.

The virtual tree in ParDiff contains a reference to the RawNode for each element. Merging unkeyed and keyed virtual dom techniques together. This allows for rendering to be performed in a keyed fashion for all nodes, while not requiring additional memory or developer overhead.

The diffing itself is a lawful usage of alignWith from the Data.These package. By modeling Html as an Alignable Functor, you get principled diffing with clear separation of concerns.

IO is done using JSaddle, and works with both GHC and GHCjs.