Dual optics and biparsing - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Asad Saeeduddin

@Sandy Maguire I know you were interested in bidirectional parsing a while ago, here's some stuff I've been playing with:

  print $ biparse (each $ int /\ char) $ "12,13,14."                  -- > Just ([(12,','),(13,','),(14,'.')],"")
  print $ biprint (each $ int /\ char) $ [(12,','),(13,','),(14,'.')] -- > Just ([(12,','),(13,','),(14,'.')],"12,13,14.")
Asad Saeeduddin

more here: https://github.com/masaeedu/co-optics/blob/6faf1ad795abb9920f4dc7074e3f15fad01e5b3c/src/Main.hs#L28

Two optics for the price of one. Contribute to masaeedu/co-optics development by creating an account on GitHub.