{-# LANGUAGE DeriveDataTypeable, OverloadedStrings, RecordWildCards, TemplateHaskell #-}
module Clckwrks.NavBar.Types where

import Clckwrks.Types (NamedLink(..))
import Data.Aeson     (ToJSON(..), (.=), object)
import Data.Data      (Data, Typeable)
import Data.SafeCopy  (base, deriveSafeCopy)
import Data.Text      (Text)

newtype NavBar = NavBar
    { NavBar -> [NavBarItem]
navBarItems :: [NavBarItem]
    }
    deriving (NavBar -> NavBar -> Bool
(NavBar -> NavBar -> Bool)
-> (NavBar -> NavBar -> Bool) -> Eq NavBar
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NavBar -> NavBar -> Bool
$c/= :: NavBar -> NavBar -> Bool
== :: NavBar -> NavBar -> Bool
$c== :: NavBar -> NavBar -> Bool
Eq, ReadPrec [NavBar]
ReadPrec NavBar
Int -> ReadS NavBar
ReadS [NavBar]
(Int -> ReadS NavBar)
-> ReadS [NavBar]
-> ReadPrec NavBar
-> ReadPrec [NavBar]
-> Read NavBar
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NavBar]
$creadListPrec :: ReadPrec [NavBar]
readPrec :: ReadPrec NavBar
$creadPrec :: ReadPrec NavBar
readList :: ReadS [NavBar]
$creadList :: ReadS [NavBar]
readsPrec :: Int -> ReadS NavBar
$creadsPrec :: Int -> ReadS NavBar
Read, Int -> NavBar -> ShowS
[NavBar] -> ShowS
NavBar -> String
(Int -> NavBar -> ShowS)
-> (NavBar -> String) -> ([NavBar] -> ShowS) -> Show NavBar
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NavBar] -> ShowS
$cshowList :: [NavBar] -> ShowS
show :: NavBar -> String
$cshow :: NavBar -> String
showsPrec :: Int -> NavBar -> ShowS
$cshowsPrec :: Int -> NavBar -> ShowS
Show, Typeable NavBar
DataType
Constr
Typeable NavBar
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> NavBar -> c NavBar)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c NavBar)
-> (NavBar -> Constr)
-> (NavBar -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c NavBar))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NavBar))
-> ((forall b. Data b => b -> b) -> NavBar -> NavBar)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> NavBar -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> NavBar -> r)
-> (forall u. (forall d. Data d => d -> u) -> NavBar -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> NavBar -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> NavBar -> m NavBar)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> NavBar -> m NavBar)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> NavBar -> m NavBar)
-> Data NavBar
NavBar -> DataType
NavBar -> Constr
(forall b. Data b => b -> b) -> NavBar -> NavBar
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NavBar -> c NavBar
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NavBar
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> NavBar -> u
forall u. (forall d. Data d => d -> u) -> NavBar -> [u]
forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NavBar -> r
forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NavBar -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NavBar -> m NavBar
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NavBar -> m NavBar
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NavBar
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NavBar -> c NavBar
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NavBar)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NavBar)
$cNavBar :: Constr
$tNavBar :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> NavBar -> m NavBar
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NavBar -> m NavBar
gmapMp :: (forall d. Data d => d -> m d) -> NavBar -> m NavBar
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NavBar -> m NavBar
gmapM :: (forall d. Data d => d -> m d) -> NavBar -> m NavBar
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NavBar -> m NavBar
gmapQi :: Int -> (forall d. Data d => d -> u) -> NavBar -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NavBar -> u
gmapQ :: (forall d. Data d => d -> u) -> NavBar -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> NavBar -> [u]
gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NavBar -> r
$cgmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NavBar -> r
gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NavBar -> r
$cgmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NavBar -> r
gmapT :: (forall b. Data b => b -> b) -> NavBar -> NavBar
$cgmapT :: (forall b. Data b => b -> b) -> NavBar -> NavBar
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NavBar)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NavBar)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c NavBar)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NavBar)
dataTypeOf :: NavBar -> DataType
$cdataTypeOf :: NavBar -> DataType
toConstr :: NavBar -> Constr
$ctoConstr :: NavBar -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NavBar
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NavBar
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NavBar -> c NavBar
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NavBar -> c NavBar
$cp1Data :: Typeable NavBar
Data, Typeable)



data NavBarItem
    = NBLink    NamedLink
    | NBSubNavBar Text NavBar
    deriving (NavBarItem -> NavBarItem -> Bool
(NavBarItem -> NavBarItem -> Bool)
-> (NavBarItem -> NavBarItem -> Bool) -> Eq NavBarItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NavBarItem -> NavBarItem -> Bool
$c/= :: NavBarItem -> NavBarItem -> Bool
== :: NavBarItem -> NavBarItem -> Bool
$c== :: NavBarItem -> NavBarItem -> Bool
Eq, ReadPrec [NavBarItem]
ReadPrec NavBarItem
Int -> ReadS NavBarItem
ReadS [NavBarItem]
(Int -> ReadS NavBarItem)
-> ReadS [NavBarItem]
-> ReadPrec NavBarItem
-> ReadPrec [NavBarItem]
-> Read NavBarItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NavBarItem]
$creadListPrec :: ReadPrec [NavBarItem]
readPrec :: ReadPrec NavBarItem
$creadPrec :: ReadPrec NavBarItem
readList :: ReadS [NavBarItem]
$creadList :: ReadS [NavBarItem]
readsPrec :: Int -> ReadS NavBarItem
$creadsPrec :: Int -> ReadS NavBarItem
Read, Int -> NavBarItem -> ShowS
[NavBarItem] -> ShowS
NavBarItem -> String
(Int -> NavBarItem -> ShowS)
-> (NavBarItem -> String)
-> ([NavBarItem] -> ShowS)
-> Show NavBarItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NavBarItem] -> ShowS
$cshowList :: [NavBarItem] -> ShowS
show :: NavBarItem -> String
$cshow :: NavBarItem -> String
showsPrec :: Int -> NavBarItem -> ShowS
$cshowsPrec :: Int -> NavBarItem -> ShowS
Show, Typeable NavBarItem
DataType
Constr
Typeable NavBarItem
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> NavBarItem -> c NavBarItem)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c NavBarItem)
-> (NavBarItem -> Constr)
-> (NavBarItem -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c NavBarItem))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c NavBarItem))
-> ((forall b. Data b => b -> b) -> NavBarItem -> NavBarItem)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> NavBarItem -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> NavBarItem -> r)
-> (forall u. (forall d. Data d => d -> u) -> NavBarItem -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> NavBarItem -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> NavBarItem -> m NavBarItem)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> NavBarItem -> m NavBarItem)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> NavBarItem -> m NavBarItem)
-> Data NavBarItem
NavBarItem -> DataType
NavBarItem -> Constr
(forall b. Data b => b -> b) -> NavBarItem -> NavBarItem
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NavBarItem -> c NavBarItem
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NavBarItem
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> NavBarItem -> u
forall u. (forall d. Data d => d -> u) -> NavBarItem -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NavBarItem -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NavBarItem -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NavBarItem -> m NavBarItem
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NavBarItem -> m NavBarItem
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NavBarItem
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NavBarItem -> c NavBarItem
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NavBarItem)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NavBarItem)
$cNBSubNavBar :: Constr
$cNBLink :: Constr
$tNavBarItem :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> NavBarItem -> m NavBarItem
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NavBarItem -> m NavBarItem
gmapMp :: (forall d. Data d => d -> m d) -> NavBarItem -> m NavBarItem
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NavBarItem -> m NavBarItem
gmapM :: (forall d. Data d => d -> m d) -> NavBarItem -> m NavBarItem
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NavBarItem -> m NavBarItem
gmapQi :: Int -> (forall d. Data d => d -> u) -> NavBarItem -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NavBarItem -> u
gmapQ :: (forall d. Data d => d -> u) -> NavBarItem -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> NavBarItem -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NavBarItem -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NavBarItem -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NavBarItem -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NavBarItem -> r
gmapT :: (forall b. Data b => b -> b) -> NavBarItem -> NavBarItem
$cgmapT :: (forall b. Data b => b -> b) -> NavBarItem -> NavBarItem
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NavBarItem)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NavBarItem)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c NavBarItem)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NavBarItem)
dataTypeOf :: NavBarItem -> DataType
$cdataTypeOf :: NavBarItem -> DataType
toConstr :: NavBarItem -> Constr
$ctoConstr :: NavBarItem -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NavBarItem
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NavBarItem
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NavBarItem -> c NavBarItem
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NavBarItem -> c NavBarItem
$cp1Data :: Typeable NavBarItem
Data, Typeable)
$(deriveSafeCopy 1 'base ''NavBar)
$(deriveSafeCopy 1 'base ''NavBarItem)

newtype NavBarLinks = NavBarLinks [(String, [NamedLink])]
    deriving (NavBarLinks -> NavBarLinks -> Bool
(NavBarLinks -> NavBarLinks -> Bool)
-> (NavBarLinks -> NavBarLinks -> Bool) -> Eq NavBarLinks
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NavBarLinks -> NavBarLinks -> Bool
$c/= :: NavBarLinks -> NavBarLinks -> Bool
== :: NavBarLinks -> NavBarLinks -> Bool
$c== :: NavBarLinks -> NavBarLinks -> Bool
Eq, ReadPrec [NavBarLinks]
ReadPrec NavBarLinks
Int -> ReadS NavBarLinks
ReadS [NavBarLinks]
(Int -> ReadS NavBarLinks)
-> ReadS [NavBarLinks]
-> ReadPrec NavBarLinks
-> ReadPrec [NavBarLinks]
-> Read NavBarLinks
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NavBarLinks]
$creadListPrec :: ReadPrec [NavBarLinks]
readPrec :: ReadPrec NavBarLinks
$creadPrec :: ReadPrec NavBarLinks
readList :: ReadS [NavBarLinks]
$creadList :: ReadS [NavBarLinks]
readsPrec :: Int -> ReadS NavBarLinks
$creadsPrec :: Int -> ReadS NavBarLinks
Read, Int -> NavBarLinks -> ShowS
[NavBarLinks] -> ShowS
NavBarLinks -> String
(Int -> NavBarLinks -> ShowS)
-> (NavBarLinks -> String)
-> ([NavBarLinks] -> ShowS)
-> Show NavBarLinks
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NavBarLinks] -> ShowS
$cshowList :: [NavBarLinks] -> ShowS
show :: NavBarLinks -> String
$cshow :: NavBarLinks -> String
showsPrec :: Int -> NavBarLinks -> ShowS
$cshowsPrec :: Int -> NavBarLinks -> ShowS
Show, Typeable NavBarLinks
DataType
Constr
Typeable NavBarLinks
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> NavBarLinks -> c NavBarLinks)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c NavBarLinks)
-> (NavBarLinks -> Constr)
-> (NavBarLinks -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c NavBarLinks))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c NavBarLinks))
-> ((forall b. Data b => b -> b) -> NavBarLinks -> NavBarLinks)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> NavBarLinks -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> NavBarLinks -> r)
-> (forall u. (forall d. Data d => d -> u) -> NavBarLinks -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> NavBarLinks -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> NavBarLinks -> m NavBarLinks)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> NavBarLinks -> m NavBarLinks)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> NavBarLinks -> m NavBarLinks)
-> Data NavBarLinks
NavBarLinks -> DataType
NavBarLinks -> Constr
(forall b. Data b => b -> b) -> NavBarLinks -> NavBarLinks
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NavBarLinks -> c NavBarLinks
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NavBarLinks
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> NavBarLinks -> u
forall u. (forall d. Data d => d -> u) -> NavBarLinks -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NavBarLinks -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NavBarLinks -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NavBarLinks -> m NavBarLinks
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NavBarLinks -> m NavBarLinks
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NavBarLinks
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NavBarLinks -> c NavBarLinks
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NavBarLinks)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NavBarLinks)
$cNavBarLinks :: Constr
$tNavBarLinks :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> NavBarLinks -> m NavBarLinks
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NavBarLinks -> m NavBarLinks
gmapMp :: (forall d. Data d => d -> m d) -> NavBarLinks -> m NavBarLinks
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NavBarLinks -> m NavBarLinks
gmapM :: (forall d. Data d => d -> m d) -> NavBarLinks -> m NavBarLinks
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NavBarLinks -> m NavBarLinks
gmapQi :: Int -> (forall d. Data d => d -> u) -> NavBarLinks -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NavBarLinks -> u
gmapQ :: (forall d. Data d => d -> u) -> NavBarLinks -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> NavBarLinks -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NavBarLinks -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NavBarLinks -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NavBarLinks -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NavBarLinks -> r
gmapT :: (forall b. Data b => b -> b) -> NavBarLinks -> NavBarLinks
$cgmapT :: (forall b. Data b => b -> b) -> NavBarLinks -> NavBarLinks
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NavBarLinks)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c NavBarLinks)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c NavBarLinks)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NavBarLinks)
dataTypeOf :: NavBarLinks -> DataType
$cdataTypeOf :: NavBarLinks -> DataType
toConstr :: NavBarLinks -> Constr
$ctoConstr :: NavBarLinks -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NavBarLinks
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NavBarLinks
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NavBarLinks -> c NavBarLinks
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NavBarLinks -> c NavBarLinks
$cp1Data :: Typeable NavBarLinks
Data, Typeable)

instance ToJSON NavBarLinks where
    toJSON :: NavBarLinks -> Value
toJSON (NavBarLinks [(String, [NamedLink])]
navBarLinks) =
        [Value] -> Value
forall a. ToJSON a => a -> Value
toJSON ([Value] -> Value) -> [Value] -> Value
forall a b. (a -> b) -> a -> b
$ ((String, [NamedLink]) -> Value)
-> [(String, [NamedLink])] -> [Value]
forall a b. (a -> b) -> [a] -> [b]
map (\(String
plugName, [NamedLink]
links) ->
                          [Pair] -> Value
object [ Text
"pluginName" Text -> String -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
.= String
plugName
                                 , Text
"pluginLinks" Text -> [Value] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
.= (NamedLink -> Value) -> [NamedLink] -> [Value]
forall a b. (a -> b) -> [a] -> [b]
map NamedLink -> Value
forall a. ToJSON a => a -> Value
toJSON [NamedLink]
links
                                 ]) [(String, [NamedLink])]
navBarLinks