summaryrefslogtreecommitdiff
path: root/Text/OPML/Lens.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Text/OPML/Lens.hs')
-rw-r--r--Text/OPML/Lens.hs17
1 files changed, 9 insertions, 8 deletions
diff --git a/Text/OPML/Lens.hs b/Text/OPML/Lens.hs
index ac905c0..b8c26bc 100644
--- a/Text/OPML/Lens.hs
+++ b/Text/OPML/Lens.hs
@@ -4,7 +4,7 @@
module Text.OPML.Lens (module Text.OPML.Lens) where
-- {{{ Imports
-import Lens.Simple
+import Lens.Micro.TH
import Text.OPML.Types
-- }}}
@@ -25,7 +25,7 @@ makeLensesFor
, ("ownerEmail", "ownerEmailL")
, ("ownerId", "ownerIdL")
, ("docs", "docsL")
- -- , ("expansionState", "expansionStateL")
+ , ("expansionState", "expansionStateL")
, ("vertScrollState", "vertScrollStateL")
, ("windowBottom", "windowBottomL")
, ("windowLeft", "windowLeftL")
@@ -33,10 +33,6 @@ makeLensesFor
, ("windowTop", "windowTopL")
] ''OpmlHead
-expansionStateL :: Traversal' OpmlHead Int
-expansionStateL inj a@OpmlHead { expansionState = es } = (\x -> a { expansionState = x }) <$> traverse inj es
-{-# INLINE expansionStateL #-}
-
-- * 'OutlineSubscription' lenses
makeLensesFor
[ ("xmlUri", "xmlUriL")
@@ -57,5 +53,10 @@ makeLensesFor
] ''OutlineBase
--- * 'OpmlOutline' traversals
-makeTraversals ''OpmlOutline
+-- * 'OpmlOutline' lenses
+makeLensesFor
+ [ ("opmlOutlineBase", "opmlOutlineBaseL")
+ , ("opmlOutlineContent", "opmlOutlineContentL")
+ , ("opmlOutlineUri", "opmlOutlineUriL")
+ , ("opmlOutlineSubscription", "opmlOutlineSubscriptionL")
+ ] ''OpmlOutline