Skip to content

Instantly share code, notes, and snippets.

@pzp1997
Created July 23, 2018 02:18
Show Gist options
  • Save pzp1997/b3f40ca6a743436f8f226658fc519b4a to your computer and use it in GitHub Desktop.
Save pzp1997/b3f40ca6a743436f8f226658fc519b4a to your computer and use it in GitHub Desktop.
{- PATCHES -}
type alias Patches =
List PatchTree
type PatchTree
= Change Patch
| At Int (List PatchTree)
type Patch
= Redraw VirtualNode
| Facts VirtualNode
| Append (List VirtualNode)
| RemoveLast Int
{- VIRTUAL NODE -}
type VirtualNode
= Leaf Tag Facts
| Parent Tag Facts (List VirtualNode)
type alias Tag =
String
type alias Facts =
Dict String (Either String (Dict String String))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment