I'm experimenting with some ideas and I think one of the problems I have could be solved with lenses, but it doesn't seem to work how I expect it to when I try to implement it.
I want to create a tree of data structures, where each node stores a lens that goes from the root of the tree down to that node. Here is a conceptual image. The idea in that image is that the color of the lens matches the color of the path that it represents through the tree.
Here is an example of a tree shaped data structure without storing the path lenses at the nodes:
{-# LANGUAGE TemplateHaskell #-}