summaryrefslogtreecommitdiff
path: root/Text/OPML/Lens.hs
blob: b8c26bc7a8fdd71fe75c7fdbf5d8abf863a64289 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# LANGUAGE RankNTypes      #-}
{-# LANGUAGE TemplateHaskell #-}
module Text.OPML.Lens (module Text.OPML.Lens) where

-- {{{ Imports
import           Lens.Micro.TH

import           Text.OPML.Types
-- }}}

-- * 'Opml' lenses
makeLensesFor
  [ ("opmlVersion", "opmlVersionL")
  , ("opmlHead", "opmlHeadL")
  , ("opmlOutlines", "opmlOutlinesL")
  ] ''Opml

-- * 'OpmlHead' lenses
makeLensesFor
  [ ("opmlTitle", "opmlTitleL")
  , ("opmlCreated", "opmlCreatedL")
  , ("modified", "modifiedL")
  , ("ownerName", "ownerNameL")
  , ("ownerEmail", "ownerEmailL")
  , ("ownerId", "ownerIdL")
  , ("docs", "docsL")
  , ("expansionState", "expansionStateL")
  , ("vertScrollState", "vertScrollStateL")
  , ("windowBottom", "windowBottomL")
  , ("windowLeft", "windowLeftL")
  , ("windowRight", "windowRightL")
  , ("windowTop", "windowTopL")
  ] ''OpmlHead

-- * 'OutlineSubscription' lenses
makeLensesFor
  [ ("xmlUri", "xmlUriL")
  , ("htmlUri", "htmlUriL")
  , ("description", "descriptionL")
  , ("language", "languageL")
  , ("subscriptionTitle", "subscriptionTitleL")
  , ("subscriptionVersion", "subscriptionVersionL")
  ] ''OutlineSubscription

-- * 'OutlineBase' lenses
makeLensesFor
  [ ("text", "textL")
  , ("isComment", "isCommentL")
  , ("isBreakpoint", "isBreakpointL")
  , ("outlineCreated", "outlineCreatedL")
  , ("categories", "categoriesL")
  ] ''OutlineBase


-- * 'OpmlOutline' lenses
makeLensesFor
  [ ("opmlOutlineBase", "opmlOutlineBaseL")
  , ("opmlOutlineContent", "opmlOutlineContentL")
  , ("opmlOutlineUri", "opmlOutlineUriL")
  , ("opmlOutlineSubscription", "opmlOutlineSubscriptionL")
  ] ''OpmlOutline