Generalization of lenses, folds and traversals for haskell