module Text.OPML.Lens (module Text.OPML.Lens) where
import Lens.Simple
import Text.OPML.Types
makeLensesFor
[ ("opmlVersion", "opmlVersionL")
, ("opmlHead", "opmlHeadL")
, ("opmlOutlines", "opmlOutlinesL")
] ''Opml
makeLensesFor
[ ("opmlTitle", "opmlTitleL")
, ("opmlCreated", "opmlCreatedL")
, ("modified", "modifiedL")
, ("ownerName", "ownerNameL")
, ("ownerEmail", "ownerEmailL")
, ("ownerId", "ownerIdL")
, ("docs", "docsL")
, ("vertScrollState", "vertScrollStateL")
, ("windowBottom", "windowBottomL")
, ("windowLeft", "windowLeftL")
, ("windowRight", "windowRightL")
, ("windowTop", "windowTopL")
] ''OpmlHead
expansionStateL :: Traversal' OpmlHead Int
expansionStateL inj a@OpmlHead { expansionState = es } = (\x -> a { expansionState = x }) <$> traverse inj es
makeLensesFor
[ ("xmlUri", "xmlUriL")
, ("htmlUri", "htmlUriL")
, ("description", "descriptionL")
, ("language", "languageL")
, ("subscriptionTitle", "subscriptionTitleL")
, ("subscriptionVersion", "subscriptionVersionL")
] ''OutlineSubscription
makeLensesFor
[ ("text", "textL")
, ("isComment", "isCommentL")
, ("isBreakpoint", "isBreakpointL")
, ("outlineCreated", "outlineCreatedL")
, ("categories", "categoriesL")
] ''OutlineBase
makeTraversals ''OpmlOutline