Skip to content

Instantly share code, notes, and snippets.

@zyla
Created June 4, 2018 11:33
Show Gist options
  • Save zyla/29094f3206dcd6f3d9011523da9b3af7 to your computer and use it in GitHub Desktop.
Save zyla/29094f3206dcd6f3d9011523da9b3af7 to your computer and use it in GitHub Desktop.
data GRef da a = GRef (Dynamic a) (Callback da)
newtype Ref a = GRef (a -> a) a
type GLens s ds a da = { get :: s -> a, modify :: da -> ds }
type Lens s a = GLens s (s -> s) a (a -> a) = { get :: s -> a, modify :: (a -> a) -> (s -> s) }
type ElmStateRef = GRef Action State
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment