A Virtual Dom in pure Haskell, based on Html as an Alignable Functor.
Virtual DOM diffing in pure Haskell. The diffing is a lawful usage of alignWith
from the Data.These
package. This implementation stores a reference to the RawNode
for each node in the virtual tree, merging keyed and unkeyed virtual DOM techniques.
Shpadoinkle Backend ParDiff
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.