{-# LANGUAGE CPP, DeriveTraversable #-}
module Documentation.Haddock.Types where
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative
import Data.Foldable
import Data.Traversable
#endif
#if MIN_VERSION_base(4,8,0)
import Control.Arrow ((***))
import Data.Bifunctor
#endif
#if MIN_VERSION_base(4,10,0)
import Data.Bifoldable
import Data.Bitraversable
#endif
data Meta = Meta { Meta -> Maybe Version
_version :: Maybe Version
, Meta -> Maybe Package
_package :: Maybe Package
} deriving (Meta -> Meta -> Bool
(Meta -> Meta -> Bool) -> (Meta -> Meta -> Bool) -> Eq Meta
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Meta -> Meta -> Bool
$c/= :: Meta -> Meta -> Bool
== :: Meta -> Meta -> Bool
$c== :: Meta -> Meta -> Bool
Eq, Int -> Meta -> ShowS
[Meta] -> ShowS
Meta -> Package
(Int -> Meta -> ShowS)
-> (Meta -> Package) -> ([Meta] -> ShowS) -> Show Meta
forall a.
(Int -> a -> ShowS) -> (a -> Package) -> ([a] -> ShowS) -> Show a
showList :: [Meta] -> ShowS
$cshowList :: [Meta] -> ShowS
show :: Meta -> Package
$cshow :: Meta -> Package
showsPrec :: Int -> Meta -> ShowS
$cshowsPrec :: Int -> Meta -> ShowS
Show)
data MetaDoc mod id =
MetaDoc { MetaDoc mod id -> Meta
_meta :: Meta
, MetaDoc mod id -> DocH mod id
_doc :: DocH mod id
} deriving (MetaDoc mod id -> MetaDoc mod id -> Bool
(MetaDoc mod id -> MetaDoc mod id -> Bool)
-> (MetaDoc mod id -> MetaDoc mod id -> Bool)
-> Eq (MetaDoc mod id)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall mod id.
(Eq id, Eq mod) =>
MetaDoc mod id -> MetaDoc mod id -> Bool
/= :: MetaDoc mod id -> MetaDoc mod id -> Bool
$c/= :: forall mod id.
(Eq id, Eq mod) =>
MetaDoc mod id -> MetaDoc mod id -> Bool
== :: MetaDoc mod id -> MetaDoc mod id -> Bool
$c== :: forall mod id.
(Eq id, Eq mod) =>
MetaDoc mod id -> MetaDoc mod id -> Bool
Eq, Int -> MetaDoc mod id -> ShowS
[MetaDoc mod id] -> ShowS
MetaDoc mod id -> Package
(Int -> MetaDoc mod id -> ShowS)
-> (MetaDoc mod id -> Package)
-> ([MetaDoc mod id] -> ShowS)
-> Show (MetaDoc mod id)
forall a.
(Int -> a -> ShowS) -> (a -> Package) -> ([a] -> ShowS) -> Show a
forall mod id.
(Show id, Show mod) =>
Int -> MetaDoc mod id -> ShowS
forall mod id. (Show id, Show mod) => [MetaDoc mod id] -> ShowS
forall mod id. (Show id, Show mod) => MetaDoc mod id -> Package
showList :: [MetaDoc mod id] -> ShowS
$cshowList :: forall mod id. (Show id, Show mod) => [MetaDoc mod id] -> ShowS
show :: MetaDoc mod id -> Package
$cshow :: forall mod id. (Show id, Show mod) => MetaDoc mod id -> Package
showsPrec :: Int -> MetaDoc mod id -> ShowS
$cshowsPrec :: forall mod id.
(Show id, Show mod) =>
Int -> MetaDoc mod id -> ShowS
Show, a -> MetaDoc mod b -> MetaDoc mod a
(a -> b) -> MetaDoc mod a -> MetaDoc mod b
(forall a b. (a -> b) -> MetaDoc mod a -> MetaDoc mod b)
-> (forall a b. a -> MetaDoc mod b -> MetaDoc mod a)
-> Functor (MetaDoc mod)
forall a b. a -> MetaDoc mod b -> MetaDoc mod a
forall a b. (a -> b) -> MetaDoc mod a -> MetaDoc mod b
forall mod a b. a -> MetaDoc mod b -> MetaDoc mod a
forall mod a b. (a -> b) -> MetaDoc mod a -> MetaDoc mod b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> MetaDoc mod b -> MetaDoc mod a
$c<$ :: forall mod a b. a -> MetaDoc mod b -> MetaDoc mod a
fmap :: (a -> b) -> MetaDoc mod a -> MetaDoc mod b
$cfmap :: forall mod a b. (a -> b) -> MetaDoc mod a -> MetaDoc mod b
Functor, MetaDoc mod a -> Bool
(a -> m) -> MetaDoc mod a -> m
(a -> b -> b) -> b -> MetaDoc mod a -> b
(forall m. Monoid m => MetaDoc mod m -> m)
-> (forall m a. Monoid m => (a -> m) -> MetaDoc mod a -> m)
-> (forall m a. Monoid m => (a -> m) -> MetaDoc mod a -> m)
-> (forall a b. (a -> b -> b) -> b -> MetaDoc mod a -> b)
-> (forall a b. (a -> b -> b) -> b -> MetaDoc mod a -> b)
-> (forall b a. (b -> a -> b) -> b -> MetaDoc mod a -> b)
-> (forall b a. (b -> a -> b) -> b -> MetaDoc mod a -> b)
-> (forall a. (a -> a -> a) -> MetaDoc mod a -> a)
-> (forall a. (a -> a -> a) -> MetaDoc mod a -> a)
-> (forall a. MetaDoc mod a -> [a])
-> (forall a. MetaDoc mod a -> Bool)
-> (forall a. MetaDoc mod a -> Int)
-> (forall a. Eq a => a -> MetaDoc mod a -> Bool)
-> (forall a. Ord a => MetaDoc mod a -> a)
-> (forall a. Ord a => MetaDoc mod a -> a)
-> (forall a. Num a => MetaDoc mod a -> a)
-> (forall a. Num a => MetaDoc mod a -> a)
-> Foldable (MetaDoc mod)
forall a. Eq a => a -> MetaDoc mod a -> Bool
forall a. Num a => MetaDoc mod a -> a
forall a. Ord a => MetaDoc mod a -> a
forall m. Monoid m => MetaDoc mod m -> m
forall a. MetaDoc mod a -> Bool
forall a. MetaDoc mod a -> Int
forall a. MetaDoc mod a -> [a]
forall a. (a -> a -> a) -> MetaDoc mod a -> a
forall mod a. Eq a => a -> MetaDoc mod a -> Bool
forall mod a. Num a => MetaDoc mod a -> a
forall mod a. Ord a => MetaDoc mod a -> a
forall m a. Monoid m => (a -> m) -> MetaDoc mod a -> m
forall mod m. Monoid m => MetaDoc mod m -> m
forall mod a. MetaDoc mod a -> Bool
forall mod a. MetaDoc mod a -> Int
forall mod a. MetaDoc mod a -> [a]
forall b a. (b -> a -> b) -> b -> MetaDoc mod a -> b
forall a b. (a -> b -> b) -> b -> MetaDoc mod a -> b
forall mod a. (a -> a -> a) -> MetaDoc mod a -> a
forall mod m a. Monoid m => (a -> m) -> MetaDoc mod a -> m
forall mod b a. (b -> a -> b) -> b -> MetaDoc mod a -> b
forall mod a b. (a -> b -> b) -> b -> MetaDoc mod a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: MetaDoc mod a -> a
$cproduct :: forall mod a. Num a => MetaDoc mod a -> a
sum :: MetaDoc mod a -> a
$csum :: forall mod a. Num a => MetaDoc mod a -> a
minimum :: MetaDoc mod a -> a
$cminimum :: forall mod a. Ord a => MetaDoc mod a -> a
maximum :: MetaDoc mod a -> a
$cmaximum :: forall mod a. Ord a => MetaDoc mod a -> a
elem :: a -> MetaDoc mod a -> Bool
$celem :: forall mod a. Eq a => a -> MetaDoc mod a -> Bool
length :: MetaDoc mod a -> Int
$clength :: forall mod a. MetaDoc mod a -> Int
null :: MetaDoc mod a -> Bool
$cnull :: forall mod a. MetaDoc mod a -> Bool
toList :: MetaDoc mod a -> [a]
$ctoList :: forall mod a. MetaDoc mod a -> [a]
foldl1 :: (a -> a -> a) -> MetaDoc mod a -> a
$cfoldl1 :: forall mod a. (a -> a -> a) -> MetaDoc mod a -> a
foldr1 :: (a -> a -> a) -> MetaDoc mod a -> a
$cfoldr1 :: forall mod a. (a -> a -> a) -> MetaDoc mod a -> a
foldl' :: (b -> a -> b) -> b -> MetaDoc mod a -> b
$cfoldl' :: forall mod b a. (b -> a -> b) -> b -> MetaDoc mod a -> b
foldl :: (b -> a -> b) -> b -> MetaDoc mod a -> b
$cfoldl :: forall mod b a. (b -> a -> b) -> b -> MetaDoc mod a -> b
foldr' :: (a -> b -> b) -> b -> MetaDoc mod a -> b
$cfoldr' :: forall mod a b. (a -> b -> b) -> b -> MetaDoc mod a -> b
foldr :: (a -> b -> b) -> b -> MetaDoc mod a -> b
$cfoldr :: forall mod a b. (a -> b -> b) -> b -> MetaDoc mod a -> b
foldMap' :: (a -> m) -> MetaDoc mod a -> m
$cfoldMap' :: forall mod m a. Monoid m => (a -> m) -> MetaDoc mod a -> m
foldMap :: (a -> m) -> MetaDoc mod a -> m
$cfoldMap :: forall mod m a. Monoid m => (a -> m) -> MetaDoc mod a -> m
fold :: MetaDoc mod m -> m
$cfold :: forall mod m. Monoid m => MetaDoc mod m -> m
Foldable, Functor (MetaDoc mod)
Foldable (MetaDoc mod)
Functor (MetaDoc mod)
-> Foldable (MetaDoc mod)
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> MetaDoc mod a -> f (MetaDoc mod b))
-> (forall (f :: * -> *) a.
Applicative f =>
MetaDoc mod (f a) -> f (MetaDoc mod a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> MetaDoc mod a -> m (MetaDoc mod b))
-> (forall (m :: * -> *) a.
Monad m =>
MetaDoc mod (m a) -> m (MetaDoc mod a))
-> Traversable (MetaDoc mod)
(a -> f b) -> MetaDoc mod a -> f (MetaDoc mod b)
forall mod. Functor (MetaDoc mod)
forall mod. Foldable (MetaDoc mod)
forall mod (m :: * -> *) a.
Monad m =>
MetaDoc mod (m a) -> m (MetaDoc mod a)
forall mod (f :: * -> *) a.
Applicative f =>
MetaDoc mod (f a) -> f (MetaDoc mod a)
forall mod (m :: * -> *) a b.
Monad m =>
(a -> m b) -> MetaDoc mod a -> m (MetaDoc mod b)
forall mod (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> MetaDoc mod a -> f (MetaDoc mod b)
forall (t :: * -> *).
Functor t
-> Foldable t
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a.
Monad m =>
MetaDoc mod (m a) -> m (MetaDoc mod a)
forall (f :: * -> *) a.
Applicative f =>
MetaDoc mod (f a) -> f (MetaDoc mod a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> MetaDoc mod a -> m (MetaDoc mod b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> MetaDoc mod a -> f (MetaDoc mod b)
sequence :: MetaDoc mod (m a) -> m (MetaDoc mod a)
$csequence :: forall mod (m :: * -> *) a.
Monad m =>
MetaDoc mod (m a) -> m (MetaDoc mod a)
mapM :: (a -> m b) -> MetaDoc mod a -> m (MetaDoc mod b)
$cmapM :: forall mod (m :: * -> *) a b.
Monad m =>
(a -> m b) -> MetaDoc mod a -> m (MetaDoc mod b)
sequenceA :: MetaDoc mod (f a) -> f (MetaDoc mod a)
$csequenceA :: forall mod (f :: * -> *) a.
Applicative f =>
MetaDoc mod (f a) -> f (MetaDoc mod a)
traverse :: (a -> f b) -> MetaDoc mod a -> f (MetaDoc mod b)
$ctraverse :: forall mod (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> MetaDoc mod a -> f (MetaDoc mod b)
$cp2Traversable :: forall mod. Foldable (MetaDoc mod)
$cp1Traversable :: forall mod. Functor (MetaDoc mod)
Traversable)
#if MIN_VERSION_base(4,8,0)
instance Bifunctor MetaDoc where
bimap :: (a -> b) -> (c -> d) -> MetaDoc a c -> MetaDoc b d
bimap a -> b
f c -> d
g (MetaDoc Meta
m DocH a c
d) = Meta -> DocH b d -> MetaDoc b d
forall mod id. Meta -> DocH mod id -> MetaDoc mod id
MetaDoc Meta
m ((a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g DocH a c
d)
#endif
#if MIN_VERSION_base(4,10,0)
instance Bifoldable MetaDoc where
bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> MetaDoc a b -> c
bifoldr a -> c -> c
f b -> c -> c
g c
z MetaDoc a b
d = (a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
forall (p :: * -> * -> *) a c b.
Bifoldable p =>
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldr a -> c -> c
f b -> c -> c
g c
z (MetaDoc a b -> DocH a b
forall mod id. MetaDoc mod id -> DocH mod id
_doc MetaDoc a b
d)
instance Bitraversable MetaDoc where
bitraverse :: (a -> f c) -> (b -> f d) -> MetaDoc a b -> f (MetaDoc c d)
bitraverse a -> f c
f b -> f d
g (MetaDoc Meta
m DocH a b
d) = Meta -> DocH c d -> MetaDoc c d
forall mod id. Meta -> DocH mod id -> MetaDoc mod id
MetaDoc Meta
m (DocH c d -> MetaDoc c d) -> f (DocH c d) -> f (MetaDoc c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g DocH a b
d
#endif
overDoc :: (DocH a b -> DocH c d) -> MetaDoc a b -> MetaDoc c d
overDoc :: (DocH a b -> DocH c d) -> MetaDoc a b -> MetaDoc c d
overDoc DocH a b -> DocH c d
f MetaDoc a b
d = MetaDoc a b
d { _doc :: DocH c d
_doc = DocH a b -> DocH c d
f (DocH a b -> DocH c d) -> DocH a b -> DocH c d
forall a b. (a -> b) -> a -> b
$ MetaDoc a b -> DocH a b
forall mod id. MetaDoc mod id -> DocH mod id
_doc MetaDoc a b
d }
overDocF :: Functor f => (DocH a b -> f (DocH c d)) -> MetaDoc a b -> f (MetaDoc c d)
overDocF :: (DocH a b -> f (DocH c d)) -> MetaDoc a b -> f (MetaDoc c d)
overDocF DocH a b -> f (DocH c d)
f MetaDoc a b
d = (\DocH c d
x -> MetaDoc a b
d { _doc :: DocH c d
_doc = DocH c d
x }) (DocH c d -> MetaDoc c d) -> f (DocH c d) -> f (MetaDoc c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> DocH a b -> f (DocH c d)
f (MetaDoc a b -> DocH a b
forall mod id. MetaDoc mod id -> DocH mod id
_doc MetaDoc a b
d)
type Version = [Int]
type Package = String
data Hyperlink id = Hyperlink
{ Hyperlink id -> Package
hyperlinkUrl :: String
, Hyperlink id -> Maybe id
hyperlinkLabel :: Maybe id
} deriving (Hyperlink id -> Hyperlink id -> Bool
(Hyperlink id -> Hyperlink id -> Bool)
-> (Hyperlink id -> Hyperlink id -> Bool) -> Eq (Hyperlink id)
forall id. Eq id => Hyperlink id -> Hyperlink id -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Hyperlink id -> Hyperlink id -> Bool
$c/= :: forall id. Eq id => Hyperlink id -> Hyperlink id -> Bool
== :: Hyperlink id -> Hyperlink id -> Bool
$c== :: forall id. Eq id => Hyperlink id -> Hyperlink id -> Bool
Eq, Int -> Hyperlink id -> ShowS
[Hyperlink id] -> ShowS
Hyperlink id -> Package
(Int -> Hyperlink id -> ShowS)
-> (Hyperlink id -> Package)
-> ([Hyperlink id] -> ShowS)
-> Show (Hyperlink id)
forall id. Show id => Int -> Hyperlink id -> ShowS
forall id. Show id => [Hyperlink id] -> ShowS
forall id. Show id => Hyperlink id -> Package
forall a.
(Int -> a -> ShowS) -> (a -> Package) -> ([a] -> ShowS) -> Show a
showList :: [Hyperlink id] -> ShowS
$cshowList :: forall id. Show id => [Hyperlink id] -> ShowS
show :: Hyperlink id -> Package
$cshow :: forall id. Show id => Hyperlink id -> Package
showsPrec :: Int -> Hyperlink id -> ShowS
$cshowsPrec :: forall id. Show id => Int -> Hyperlink id -> ShowS
Show, a -> Hyperlink b -> Hyperlink a
(a -> b) -> Hyperlink a -> Hyperlink b
(forall a b. (a -> b) -> Hyperlink a -> Hyperlink b)
-> (forall a b. a -> Hyperlink b -> Hyperlink a)
-> Functor Hyperlink
forall a b. a -> Hyperlink b -> Hyperlink a
forall a b. (a -> b) -> Hyperlink a -> Hyperlink b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Hyperlink b -> Hyperlink a
$c<$ :: forall a b. a -> Hyperlink b -> Hyperlink a
fmap :: (a -> b) -> Hyperlink a -> Hyperlink b
$cfmap :: forall a b. (a -> b) -> Hyperlink a -> Hyperlink b
Functor, Hyperlink a -> Bool
(a -> m) -> Hyperlink a -> m
(a -> b -> b) -> b -> Hyperlink a -> b
(forall m. Monoid m => Hyperlink m -> m)
-> (forall m a. Monoid m => (a -> m) -> Hyperlink a -> m)
-> (forall m a. Monoid m => (a -> m) -> Hyperlink a -> m)
-> (forall a b. (a -> b -> b) -> b -> Hyperlink a -> b)
-> (forall a b. (a -> b -> b) -> b -> Hyperlink a -> b)
-> (forall b a. (b -> a -> b) -> b -> Hyperlink a -> b)
-> (forall b a. (b -> a -> b) -> b -> Hyperlink a -> b)
-> (forall a. (a -> a -> a) -> Hyperlink a -> a)
-> (forall a. (a -> a -> a) -> Hyperlink a -> a)
-> (forall a. Hyperlink a -> [a])
-> (forall a. Hyperlink a -> Bool)
-> (forall a. Hyperlink a -> Int)
-> (forall a. Eq a => a -> Hyperlink a -> Bool)
-> (forall a. Ord a => Hyperlink a -> a)
-> (forall a. Ord a => Hyperlink a -> a)
-> (forall a. Num a => Hyperlink a -> a)
-> (forall a. Num a => Hyperlink a -> a)
-> Foldable Hyperlink
forall a. Eq a => a -> Hyperlink a -> Bool
forall a. Num a => Hyperlink a -> a
forall a. Ord a => Hyperlink a -> a
forall m. Monoid m => Hyperlink m -> m
forall a. Hyperlink a -> Bool
forall a. Hyperlink a -> Int
forall a. Hyperlink a -> [a]
forall a. (a -> a -> a) -> Hyperlink a -> a
forall m a. Monoid m => (a -> m) -> Hyperlink a -> m
forall b a. (b -> a -> b) -> b -> Hyperlink a -> b
forall a b. (a -> b -> b) -> b -> Hyperlink a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: Hyperlink a -> a
$cproduct :: forall a. Num a => Hyperlink a -> a
sum :: Hyperlink a -> a
$csum :: forall a. Num a => Hyperlink a -> a
minimum :: Hyperlink a -> a
$cminimum :: forall a. Ord a => Hyperlink a -> a
maximum :: Hyperlink a -> a
$cmaximum :: forall a. Ord a => Hyperlink a -> a
elem :: a -> Hyperlink a -> Bool
$celem :: forall a. Eq a => a -> Hyperlink a -> Bool
length :: Hyperlink a -> Int
$clength :: forall a. Hyperlink a -> Int
null :: Hyperlink a -> Bool
$cnull :: forall a. Hyperlink a -> Bool
toList :: Hyperlink a -> [a]
$ctoList :: forall a. Hyperlink a -> [a]
foldl1 :: (a -> a -> a) -> Hyperlink a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> Hyperlink a -> a
foldr1 :: (a -> a -> a) -> Hyperlink a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> Hyperlink a -> a
foldl' :: (b -> a -> b) -> b -> Hyperlink a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> Hyperlink a -> b
foldl :: (b -> a -> b) -> b -> Hyperlink a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> Hyperlink a -> b
foldr' :: (a -> b -> b) -> b -> Hyperlink a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> Hyperlink a -> b
foldr :: (a -> b -> b) -> b -> Hyperlink a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> Hyperlink a -> b
foldMap' :: (a -> m) -> Hyperlink a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> Hyperlink a -> m
foldMap :: (a -> m) -> Hyperlink a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> Hyperlink a -> m
fold :: Hyperlink m -> m
$cfold :: forall m. Monoid m => Hyperlink m -> m
Foldable, Functor Hyperlink
Foldable Hyperlink
Functor Hyperlink
-> Foldable Hyperlink
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Hyperlink a -> f (Hyperlink b))
-> (forall (f :: * -> *) a.
Applicative f =>
Hyperlink (f a) -> f (Hyperlink a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Hyperlink a -> m (Hyperlink b))
-> (forall (m :: * -> *) a.
Monad m =>
Hyperlink (m a) -> m (Hyperlink a))
-> Traversable Hyperlink
(a -> f b) -> Hyperlink a -> f (Hyperlink b)
forall (t :: * -> *).
Functor t
-> Foldable t
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a.
Monad m =>
Hyperlink (m a) -> m (Hyperlink a)
forall (f :: * -> *) a.
Applicative f =>
Hyperlink (f a) -> f (Hyperlink a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Hyperlink a -> m (Hyperlink b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Hyperlink a -> f (Hyperlink b)
sequence :: Hyperlink (m a) -> m (Hyperlink a)
$csequence :: forall (m :: * -> *) a.
Monad m =>
Hyperlink (m a) -> m (Hyperlink a)
mapM :: (a -> m b) -> Hyperlink a -> m (Hyperlink b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Hyperlink a -> m (Hyperlink b)
sequenceA :: Hyperlink (f a) -> f (Hyperlink a)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
Hyperlink (f a) -> f (Hyperlink a)
traverse :: (a -> f b) -> Hyperlink a -> f (Hyperlink b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Hyperlink a -> f (Hyperlink b)
$cp2Traversable :: Foldable Hyperlink
$cp1Traversable :: Functor Hyperlink
Traversable)
data ModLink id = ModLink
{ ModLink id -> Package
modLinkName :: String
, ModLink id -> Maybe id
modLinkLabel :: Maybe id
} deriving (ModLink id -> ModLink id -> Bool
(ModLink id -> ModLink id -> Bool)
-> (ModLink id -> ModLink id -> Bool) -> Eq (ModLink id)
forall id. Eq id => ModLink id -> ModLink id -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModLink id -> ModLink id -> Bool
$c/= :: forall id. Eq id => ModLink id -> ModLink id -> Bool
== :: ModLink id -> ModLink id -> Bool
$c== :: forall id. Eq id => ModLink id -> ModLink id -> Bool
Eq, Int -> ModLink id -> ShowS
[ModLink id] -> ShowS
ModLink id -> Package
(Int -> ModLink id -> ShowS)
-> (ModLink id -> Package)
-> ([ModLink id] -> ShowS)
-> Show (ModLink id)
forall id. Show id => Int -> ModLink id -> ShowS
forall id. Show id => [ModLink id] -> ShowS
forall id. Show id => ModLink id -> Package
forall a.
(Int -> a -> ShowS) -> (a -> Package) -> ([a] -> ShowS) -> Show a
showList :: [ModLink id] -> ShowS
$cshowList :: forall id. Show id => [ModLink id] -> ShowS
show :: ModLink id -> Package
$cshow :: forall id. Show id => ModLink id -> Package
showsPrec :: Int -> ModLink id -> ShowS
$cshowsPrec :: forall id. Show id => Int -> ModLink id -> ShowS
Show, a -> ModLink b -> ModLink a
(a -> b) -> ModLink a -> ModLink b
(forall a b. (a -> b) -> ModLink a -> ModLink b)
-> (forall a b. a -> ModLink b -> ModLink a) -> Functor ModLink
forall a b. a -> ModLink b -> ModLink a
forall a b. (a -> b) -> ModLink a -> ModLink b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> ModLink b -> ModLink a
$c<$ :: forall a b. a -> ModLink b -> ModLink a
fmap :: (a -> b) -> ModLink a -> ModLink b
$cfmap :: forall a b. (a -> b) -> ModLink a -> ModLink b
Functor, ModLink a -> Bool
(a -> m) -> ModLink a -> m
(a -> b -> b) -> b -> ModLink a -> b
(forall m. Monoid m => ModLink m -> m)
-> (forall m a. Monoid m => (a -> m) -> ModLink a -> m)
-> (forall m a. Monoid m => (a -> m) -> ModLink a -> m)
-> (forall a b. (a -> b -> b) -> b -> ModLink a -> b)
-> (forall a b. (a -> b -> b) -> b -> ModLink a -> b)
-> (forall b a. (b -> a -> b) -> b -> ModLink a -> b)
-> (forall b a. (b -> a -> b) -> b -> ModLink a -> b)
-> (forall a. (a -> a -> a) -> ModLink a -> a)
-> (forall a. (a -> a -> a) -> ModLink a -> a)
-> (forall a. ModLink a -> [a])
-> (forall a. ModLink a -> Bool)
-> (forall a. ModLink a -> Int)
-> (forall a. Eq a => a -> ModLink a -> Bool)
-> (forall a. Ord a => ModLink a -> a)
-> (forall a. Ord a => ModLink a -> a)
-> (forall a. Num a => ModLink a -> a)
-> (forall a. Num a => ModLink a -> a)
-> Foldable ModLink
forall a. Eq a => a -> ModLink a -> Bool
forall a. Num a => ModLink a -> a
forall a. Ord a => ModLink a -> a
forall m. Monoid m => ModLink m -> m
forall a. ModLink a -> Bool
forall a. ModLink a -> Int
forall a. ModLink a -> [a]
forall a. (a -> a -> a) -> ModLink a -> a
forall m a. Monoid m => (a -> m) -> ModLink a -> m
forall b a. (b -> a -> b) -> b -> ModLink a -> b
forall a b. (a -> b -> b) -> b -> ModLink a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: ModLink a -> a
$cproduct :: forall a. Num a => ModLink a -> a
sum :: ModLink a -> a
$csum :: forall a. Num a => ModLink a -> a
minimum :: ModLink a -> a
$cminimum :: forall a. Ord a => ModLink a -> a
maximum :: ModLink a -> a
$cmaximum :: forall a. Ord a => ModLink a -> a
elem :: a -> ModLink a -> Bool
$celem :: forall a. Eq a => a -> ModLink a -> Bool
length :: ModLink a -> Int
$clength :: forall a. ModLink a -> Int
null :: ModLink a -> Bool
$cnull :: forall a. ModLink a -> Bool
toList :: ModLink a -> [a]
$ctoList :: forall a. ModLink a -> [a]
foldl1 :: (a -> a -> a) -> ModLink a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> ModLink a -> a
foldr1 :: (a -> a -> a) -> ModLink a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> ModLink a -> a
foldl' :: (b -> a -> b) -> b -> ModLink a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> ModLink a -> b
foldl :: (b -> a -> b) -> b -> ModLink a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> ModLink a -> b
foldr' :: (a -> b -> b) -> b -> ModLink a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> ModLink a -> b
foldr :: (a -> b -> b) -> b -> ModLink a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> ModLink a -> b
foldMap' :: (a -> m) -> ModLink a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> ModLink a -> m
foldMap :: (a -> m) -> ModLink a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> ModLink a -> m
fold :: ModLink m -> m
$cfold :: forall m. Monoid m => ModLink m -> m
Foldable, Functor ModLink
Foldable ModLink
Functor ModLink
-> Foldable ModLink
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> ModLink a -> f (ModLink b))
-> (forall (f :: * -> *) a.
Applicative f =>
ModLink (f a) -> f (ModLink a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> ModLink a -> m (ModLink b))
-> (forall (m :: * -> *) a.
Monad m =>
ModLink (m a) -> m (ModLink a))
-> Traversable ModLink
(a -> f b) -> ModLink a -> f (ModLink b)
forall (t :: * -> *).
Functor t
-> Foldable t
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a. Monad m => ModLink (m a) -> m (ModLink a)
forall (f :: * -> *) a.
Applicative f =>
ModLink (f a) -> f (ModLink a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> ModLink a -> m (ModLink b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> ModLink a -> f (ModLink b)
sequence :: ModLink (m a) -> m (ModLink a)
$csequence :: forall (m :: * -> *) a. Monad m => ModLink (m a) -> m (ModLink a)
mapM :: (a -> m b) -> ModLink a -> m (ModLink b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> ModLink a -> m (ModLink b)
sequenceA :: ModLink (f a) -> f (ModLink a)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
ModLink (f a) -> f (ModLink a)
traverse :: (a -> f b) -> ModLink a -> f (ModLink b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> ModLink a -> f (ModLink b)
$cp2Traversable :: Foldable ModLink
$cp1Traversable :: Functor ModLink
Traversable)
data Picture = Picture
{ Picture -> Package
pictureUri :: String
, Picture -> Maybe Package
pictureTitle :: Maybe String
} deriving (Picture -> Picture -> Bool
(Picture -> Picture -> Bool)
-> (Picture -> Picture -> Bool) -> Eq Picture
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Picture -> Picture -> Bool
$c/= :: Picture -> Picture -> Bool
== :: Picture -> Picture -> Bool
$c== :: Picture -> Picture -> Bool
Eq, Int -> Picture -> ShowS
[Picture] -> ShowS
Picture -> Package
(Int -> Picture -> ShowS)
-> (Picture -> Package) -> ([Picture] -> ShowS) -> Show Picture
forall a.
(Int -> a -> ShowS) -> (a -> Package) -> ([a] -> ShowS) -> Show a
showList :: [Picture] -> ShowS
$cshowList :: [Picture] -> ShowS
show :: Picture -> Package
$cshow :: Picture -> Package
showsPrec :: Int -> Picture -> ShowS
$cshowsPrec :: Int -> Picture -> ShowS
Show)
data id =
{ :: Int
, :: id
} deriving (Header id -> Header id -> Bool
(Header id -> Header id -> Bool)
-> (Header id -> Header id -> Bool) -> Eq (Header id)
forall id. Eq id => Header id -> Header id -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Header id -> Header id -> Bool
$c/= :: forall id. Eq id => Header id -> Header id -> Bool
== :: Header id -> Header id -> Bool
$c== :: forall id. Eq id => Header id -> Header id -> Bool
Eq, Int -> Header id -> ShowS
[Header id] -> ShowS
Header id -> Package
(Int -> Header id -> ShowS)
-> (Header id -> Package)
-> ([Header id] -> ShowS)
-> Show (Header id)
forall id. Show id => Int -> Header id -> ShowS
forall id. Show id => [Header id] -> ShowS
forall id. Show id => Header id -> Package
forall a.
(Int -> a -> ShowS) -> (a -> Package) -> ([a] -> ShowS) -> Show a
showList :: [Header id] -> ShowS
$cshowList :: forall id. Show id => [Header id] -> ShowS
show :: Header id -> Package
$cshow :: forall id. Show id => Header id -> Package
showsPrec :: Int -> Header id -> ShowS
$cshowsPrec :: forall id. Show id => Int -> Header id -> ShowS
Show, a -> Header b -> Header a
(a -> b) -> Header a -> Header b
(forall a b. (a -> b) -> Header a -> Header b)
-> (forall a b. a -> Header b -> Header a) -> Functor Header
forall a b. a -> Header b -> Header a
forall a b. (a -> b) -> Header a -> Header b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Header b -> Header a
$c<$ :: forall a b. a -> Header b -> Header a
fmap :: (a -> b) -> Header a -> Header b
$cfmap :: forall a b. (a -> b) -> Header a -> Header b
Functor, Header a -> Bool
(a -> m) -> Header a -> m
(a -> b -> b) -> b -> Header a -> b
(forall m. Monoid m => Header m -> m)
-> (forall m a. Monoid m => (a -> m) -> Header a -> m)
-> (forall m a. Monoid m => (a -> m) -> Header a -> m)
-> (forall a b. (a -> b -> b) -> b -> Header a -> b)
-> (forall a b. (a -> b -> b) -> b -> Header a -> b)
-> (forall b a. (b -> a -> b) -> b -> Header a -> b)
-> (forall b a. (b -> a -> b) -> b -> Header a -> b)
-> (forall a. (a -> a -> a) -> Header a -> a)
-> (forall a. (a -> a -> a) -> Header a -> a)
-> (forall a. Header a -> [a])
-> (forall a. Header a -> Bool)
-> (forall a. Header a -> Int)
-> (forall a. Eq a => a -> Header a -> Bool)
-> (forall a. Ord a => Header a -> a)
-> (forall a. Ord a => Header a -> a)
-> (forall a. Num a => Header a -> a)
-> (forall a. Num a => Header a -> a)
-> Foldable Header
forall a. Eq a => a -> Header a -> Bool
forall a. Num a => Header a -> a
forall a. Ord a => Header a -> a
forall m. Monoid m => Header m -> m
forall a. Header a -> Bool
forall a. Header a -> Int
forall a. Header a -> [a]
forall a. (a -> a -> a) -> Header a -> a
forall m a. Monoid m => (a -> m) -> Header a -> m
forall b a. (b -> a -> b) -> b -> Header a -> b
forall a b. (a -> b -> b) -> b -> Header a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: Header a -> a
$cproduct :: forall a. Num a => Header a -> a
sum :: Header a -> a
$csum :: forall a. Num a => Header a -> a
minimum :: Header a -> a
$cminimum :: forall a. Ord a => Header a -> a
maximum :: Header a -> a
$cmaximum :: forall a. Ord a => Header a -> a
elem :: a -> Header a -> Bool
$celem :: forall a. Eq a => a -> Header a -> Bool
length :: Header a -> Int
$clength :: forall a. Header a -> Int
null :: Header a -> Bool
$cnull :: forall a. Header a -> Bool
toList :: Header a -> [a]
$ctoList :: forall a. Header a -> [a]
foldl1 :: (a -> a -> a) -> Header a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> Header a -> a
foldr1 :: (a -> a -> a) -> Header a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> Header a -> a
foldl' :: (b -> a -> b) -> b -> Header a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> Header a -> b
foldl :: (b -> a -> b) -> b -> Header a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> Header a -> b
foldr' :: (a -> b -> b) -> b -> Header a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> Header a -> b
foldr :: (a -> b -> b) -> b -> Header a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> Header a -> b
foldMap' :: (a -> m) -> Header a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> Header a -> m
foldMap :: (a -> m) -> Header a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> Header a -> m
fold :: Header m -> m
$cfold :: forall m. Monoid m => Header m -> m
Foldable, Functor Header
Foldable Header
Functor Header
-> Foldable Header
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Header a -> f (Header b))
-> (forall (f :: * -> *) a.
Applicative f =>
Header (f a) -> f (Header a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Header a -> m (Header b))
-> (forall (m :: * -> *) a.
Monad m =>
Header (m a) -> m (Header a))
-> Traversable Header
(a -> f b) -> Header a -> f (Header b)
forall (t :: * -> *).
Functor t
-> Foldable t
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a. Monad m => Header (m a) -> m (Header a)
forall (f :: * -> *) a.
Applicative f =>
Header (f a) -> f (Header a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Header a -> m (Header b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Header a -> f (Header b)
sequence :: Header (m a) -> m (Header a)
$csequence :: forall (m :: * -> *) a. Monad m => Header (m a) -> m (Header a)
mapM :: (a -> m b) -> Header a -> m (Header b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Header a -> m (Header b)
sequenceA :: Header (f a) -> f (Header a)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
Header (f a) -> f (Header a)
traverse :: (a -> f b) -> Header a -> f (Header b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Header a -> f (Header b)
$cp2Traversable :: Foldable Header
$cp1Traversable :: Functor Header
Traversable)
data Example = Example
{ Example -> Package
exampleExpression :: String
, Example -> [Package]
exampleResult :: [String]
} deriving (Example -> Example -> Bool
(Example -> Example -> Bool)
-> (Example -> Example -> Bool) -> Eq Example
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Example -> Example -> Bool
$c/= :: Example -> Example -> Bool
== :: Example -> Example -> Bool
$c== :: Example -> Example -> Bool
Eq, Int -> Example -> ShowS
[Example] -> ShowS
Example -> Package
(Int -> Example -> ShowS)
-> (Example -> Package) -> ([Example] -> ShowS) -> Show Example
forall a.
(Int -> a -> ShowS) -> (a -> Package) -> ([a] -> ShowS) -> Show a
showList :: [Example] -> ShowS
$cshowList :: [Example] -> ShowS
show :: Example -> Package
$cshow :: Example -> Package
showsPrec :: Int -> Example -> ShowS
$cshowsPrec :: Int -> Example -> ShowS
Show)
data TableCell id = TableCell
{ TableCell id -> Int
tableCellColspan :: Int
, TableCell id -> Int
tableCellRowspan :: Int
, TableCell id -> id
tableCellContents :: id
} deriving (TableCell id -> TableCell id -> Bool
(TableCell id -> TableCell id -> Bool)
-> (TableCell id -> TableCell id -> Bool) -> Eq (TableCell id)
forall id. Eq id => TableCell id -> TableCell id -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TableCell id -> TableCell id -> Bool
$c/= :: forall id. Eq id => TableCell id -> TableCell id -> Bool
== :: TableCell id -> TableCell id -> Bool
$c== :: forall id. Eq id => TableCell id -> TableCell id -> Bool
Eq, Int -> TableCell id -> ShowS
[TableCell id] -> ShowS
TableCell id -> Package
(Int -> TableCell id -> ShowS)
-> (TableCell id -> Package)
-> ([TableCell id] -> ShowS)
-> Show (TableCell id)
forall id. Show id => Int -> TableCell id -> ShowS
forall id. Show id => [TableCell id] -> ShowS
forall id. Show id => TableCell id -> Package
forall a.
(Int -> a -> ShowS) -> (a -> Package) -> ([a] -> ShowS) -> Show a
showList :: [TableCell id] -> ShowS
$cshowList :: forall id. Show id => [TableCell id] -> ShowS
show :: TableCell id -> Package
$cshow :: forall id. Show id => TableCell id -> Package
showsPrec :: Int -> TableCell id -> ShowS
$cshowsPrec :: forall id. Show id => Int -> TableCell id -> ShowS
Show, a -> TableCell b -> TableCell a
(a -> b) -> TableCell a -> TableCell b
(forall a b. (a -> b) -> TableCell a -> TableCell b)
-> (forall a b. a -> TableCell b -> TableCell a)
-> Functor TableCell
forall a b. a -> TableCell b -> TableCell a
forall a b. (a -> b) -> TableCell a -> TableCell b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> TableCell b -> TableCell a
$c<$ :: forall a b. a -> TableCell b -> TableCell a
fmap :: (a -> b) -> TableCell a -> TableCell b
$cfmap :: forall a b. (a -> b) -> TableCell a -> TableCell b
Functor, TableCell a -> Bool
(a -> m) -> TableCell a -> m
(a -> b -> b) -> b -> TableCell a -> b
(forall m. Monoid m => TableCell m -> m)
-> (forall m a. Monoid m => (a -> m) -> TableCell a -> m)
-> (forall m a. Monoid m => (a -> m) -> TableCell a -> m)
-> (forall a b. (a -> b -> b) -> b -> TableCell a -> b)
-> (forall a b. (a -> b -> b) -> b -> TableCell a -> b)
-> (forall b a. (b -> a -> b) -> b -> TableCell a -> b)
-> (forall b a. (b -> a -> b) -> b -> TableCell a -> b)
-> (forall a. (a -> a -> a) -> TableCell a -> a)
-> (forall a. (a -> a -> a) -> TableCell a -> a)
-> (forall a. TableCell a -> [a])
-> (forall a. TableCell a -> Bool)
-> (forall a. TableCell a -> Int)
-> (forall a. Eq a => a -> TableCell a -> Bool)
-> (forall a. Ord a => TableCell a -> a)
-> (forall a. Ord a => TableCell a -> a)
-> (forall a. Num a => TableCell a -> a)
-> (forall a. Num a => TableCell a -> a)
-> Foldable TableCell
forall a. Eq a => a -> TableCell a -> Bool
forall a. Num a => TableCell a -> a
forall a. Ord a => TableCell a -> a
forall m. Monoid m => TableCell m -> m
forall a. TableCell a -> Bool
forall a. TableCell a -> Int
forall a. TableCell a -> [a]
forall a. (a -> a -> a) -> TableCell a -> a
forall m a. Monoid m => (a -> m) -> TableCell a -> m
forall b a. (b -> a -> b) -> b -> TableCell a -> b
forall a b. (a -> b -> b) -> b -> TableCell a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: TableCell a -> a
$cproduct :: forall a. Num a => TableCell a -> a
sum :: TableCell a -> a
$csum :: forall a. Num a => TableCell a -> a
minimum :: TableCell a -> a
$cminimum :: forall a. Ord a => TableCell a -> a
maximum :: TableCell a -> a
$cmaximum :: forall a. Ord a => TableCell a -> a
elem :: a -> TableCell a -> Bool
$celem :: forall a. Eq a => a -> TableCell a -> Bool
length :: TableCell a -> Int
$clength :: forall a. TableCell a -> Int
null :: TableCell a -> Bool
$cnull :: forall a. TableCell a -> Bool
toList :: TableCell a -> [a]
$ctoList :: forall a. TableCell a -> [a]
foldl1 :: (a -> a -> a) -> TableCell a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> TableCell a -> a
foldr1 :: (a -> a -> a) -> TableCell a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> TableCell a -> a
foldl' :: (b -> a -> b) -> b -> TableCell a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> TableCell a -> b
foldl :: (b -> a -> b) -> b -> TableCell a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> TableCell a -> b
foldr' :: (a -> b -> b) -> b -> TableCell a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> TableCell a -> b
foldr :: (a -> b -> b) -> b -> TableCell a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> TableCell a -> b
foldMap' :: (a -> m) -> TableCell a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> TableCell a -> m
foldMap :: (a -> m) -> TableCell a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> TableCell a -> m
fold :: TableCell m -> m
$cfold :: forall m. Monoid m => TableCell m -> m
Foldable, Functor TableCell
Foldable TableCell
Functor TableCell
-> Foldable TableCell
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> TableCell a -> f (TableCell b))
-> (forall (f :: * -> *) a.
Applicative f =>
TableCell (f a) -> f (TableCell a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> TableCell a -> m (TableCell b))
-> (forall (m :: * -> *) a.
Monad m =>
TableCell (m a) -> m (TableCell a))
-> Traversable TableCell
(a -> f b) -> TableCell a -> f (TableCell b)
forall (t :: * -> *).
Functor t
-> Foldable t
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a.
Monad m =>
TableCell (m a) -> m (TableCell a)
forall (f :: * -> *) a.
Applicative f =>
TableCell (f a) -> f (TableCell a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> TableCell a -> m (TableCell b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> TableCell a -> f (TableCell b)
sequence :: TableCell (m a) -> m (TableCell a)
$csequence :: forall (m :: * -> *) a.
Monad m =>
TableCell (m a) -> m (TableCell a)
mapM :: (a -> m b) -> TableCell a -> m (TableCell b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> TableCell a -> m (TableCell b)
sequenceA :: TableCell (f a) -> f (TableCell a)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
TableCell (f a) -> f (TableCell a)
traverse :: (a -> f b) -> TableCell a -> f (TableCell b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> TableCell a -> f (TableCell b)
$cp2Traversable :: Foldable TableCell
$cp1Traversable :: Functor TableCell
Traversable)
newtype TableRow id = TableRow
{ TableRow id -> [TableCell id]
tableRowCells :: [TableCell id]
} deriving (TableRow id -> TableRow id -> Bool
(TableRow id -> TableRow id -> Bool)
-> (TableRow id -> TableRow id -> Bool) -> Eq (TableRow id)
forall id. Eq id => TableRow id -> TableRow id -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TableRow id -> TableRow id -> Bool
$c/= :: forall id. Eq id => TableRow id -> TableRow id -> Bool
== :: TableRow id -> TableRow id -> Bool
$c== :: forall id. Eq id => TableRow id -> TableRow id -> Bool
Eq, Int -> TableRow id -> ShowS
[TableRow id] -> ShowS
TableRow id -> Package
(Int -> TableRow id -> ShowS)
-> (TableRow id -> Package)
-> ([TableRow id] -> ShowS)
-> Show (TableRow id)
forall id. Show id => Int -> TableRow id -> ShowS
forall id. Show id => [TableRow id] -> ShowS
forall id. Show id => TableRow id -> Package
forall a.
(Int -> a -> ShowS) -> (a -> Package) -> ([a] -> ShowS) -> Show a
showList :: [TableRow id] -> ShowS
$cshowList :: forall id. Show id => [TableRow id] -> ShowS
show :: TableRow id -> Package
$cshow :: forall id. Show id => TableRow id -> Package
showsPrec :: Int -> TableRow id -> ShowS
$cshowsPrec :: forall id. Show id => Int -> TableRow id -> ShowS
Show, a -> TableRow b -> TableRow a
(a -> b) -> TableRow a -> TableRow b
(forall a b. (a -> b) -> TableRow a -> TableRow b)
-> (forall a b. a -> TableRow b -> TableRow a) -> Functor TableRow
forall a b. a -> TableRow b -> TableRow a
forall a b. (a -> b) -> TableRow a -> TableRow b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> TableRow b -> TableRow a
$c<$ :: forall a b. a -> TableRow b -> TableRow a
fmap :: (a -> b) -> TableRow a -> TableRow b
$cfmap :: forall a b. (a -> b) -> TableRow a -> TableRow b
Functor, TableRow a -> Bool
(a -> m) -> TableRow a -> m
(a -> b -> b) -> b -> TableRow a -> b
(forall m. Monoid m => TableRow m -> m)
-> (forall m a. Monoid m => (a -> m) -> TableRow a -> m)
-> (forall m a. Monoid m => (a -> m) -> TableRow a -> m)
-> (forall a b. (a -> b -> b) -> b -> TableRow a -> b)
-> (forall a b. (a -> b -> b) -> b -> TableRow a -> b)
-> (forall b a. (b -> a -> b) -> b -> TableRow a -> b)
-> (forall b a. (b -> a -> b) -> b -> TableRow a -> b)
-> (forall a. (a -> a -> a) -> TableRow a -> a)
-> (forall a. (a -> a -> a) -> TableRow a -> a)
-> (forall a. TableRow a -> [a])
-> (forall a. TableRow a -> Bool)
-> (forall a. TableRow a -> Int)
-> (forall a. Eq a => a -> TableRow a -> Bool)
-> (forall a. Ord a => TableRow a -> a)
-> (forall a. Ord a => TableRow a -> a)
-> (forall a. Num a => TableRow a -> a)
-> (forall a. Num a => TableRow a -> a)
-> Foldable TableRow
forall a. Eq a => a -> TableRow a -> Bool
forall a. Num a => TableRow a -> a
forall a. Ord a => TableRow a -> a
forall m. Monoid m => TableRow m -> m
forall a. TableRow a -> Bool
forall a. TableRow a -> Int
forall a. TableRow a -> [a]
forall a. (a -> a -> a) -> TableRow a -> a
forall m a. Monoid m => (a -> m) -> TableRow a -> m
forall b a. (b -> a -> b) -> b -> TableRow a -> b
forall a b. (a -> b -> b) -> b -> TableRow a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: TableRow a -> a
$cproduct :: forall a. Num a => TableRow a -> a
sum :: TableRow a -> a
$csum :: forall a. Num a => TableRow a -> a
minimum :: TableRow a -> a
$cminimum :: forall a. Ord a => TableRow a -> a
maximum :: TableRow a -> a
$cmaximum :: forall a. Ord a => TableRow a -> a
elem :: a -> TableRow a -> Bool
$celem :: forall a. Eq a => a -> TableRow a -> Bool
length :: TableRow a -> Int
$clength :: forall a. TableRow a -> Int
null :: TableRow a -> Bool
$cnull :: forall a. TableRow a -> Bool
toList :: TableRow a -> [a]
$ctoList :: forall a. TableRow a -> [a]
foldl1 :: (a -> a -> a) -> TableRow a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> TableRow a -> a
foldr1 :: (a -> a -> a) -> TableRow a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> TableRow a -> a
foldl' :: (b -> a -> b) -> b -> TableRow a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> TableRow a -> b
foldl :: (b -> a -> b) -> b -> TableRow a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> TableRow a -> b
foldr' :: (a -> b -> b) -> b -> TableRow a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> TableRow a -> b
foldr :: (a -> b -> b) -> b -> TableRow a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> TableRow a -> b
foldMap' :: (a -> m) -> TableRow a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> TableRow a -> m
foldMap :: (a -> m) -> TableRow a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> TableRow a -> m
fold :: TableRow m -> m
$cfold :: forall m. Monoid m => TableRow m -> m
Foldable, Functor TableRow
Foldable TableRow
Functor TableRow
-> Foldable TableRow
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> TableRow a -> f (TableRow b))
-> (forall (f :: * -> *) a.
Applicative f =>
TableRow (f a) -> f (TableRow a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> TableRow a -> m (TableRow b))
-> (forall (m :: * -> *) a.
Monad m =>
TableRow (m a) -> m (TableRow a))
-> Traversable TableRow
(a -> f b) -> TableRow a -> f (TableRow b)
forall (t :: * -> *).
Functor t
-> Foldable t
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a. Monad m => TableRow (m a) -> m (TableRow a)
forall (f :: * -> *) a.
Applicative f =>
TableRow (f a) -> f (TableRow a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> TableRow a -> m (TableRow b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> TableRow a -> f (TableRow b)
sequence :: TableRow (m a) -> m (TableRow a)
$csequence :: forall (m :: * -> *) a. Monad m => TableRow (m a) -> m (TableRow a)
mapM :: (a -> m b) -> TableRow a -> m (TableRow b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> TableRow a -> m (TableRow b)
sequenceA :: TableRow (f a) -> f (TableRow a)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
TableRow (f a) -> f (TableRow a)
traverse :: (a -> f b) -> TableRow a -> f (TableRow b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> TableRow a -> f (TableRow b)
$cp2Traversable :: Foldable TableRow
$cp1Traversable :: Functor TableRow
Traversable)
data Table id = Table
{ :: [TableRow id]
, Table id -> [TableRow id]
tableBodyRows :: [TableRow id]
} deriving (Table id -> Table id -> Bool
(Table id -> Table id -> Bool)
-> (Table id -> Table id -> Bool) -> Eq (Table id)
forall id. Eq id => Table id -> Table id -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Table id -> Table id -> Bool
$c/= :: forall id. Eq id => Table id -> Table id -> Bool
== :: Table id -> Table id -> Bool
$c== :: forall id. Eq id => Table id -> Table id -> Bool
Eq, Int -> Table id -> ShowS
[Table id] -> ShowS
Table id -> Package
(Int -> Table id -> ShowS)
-> (Table id -> Package)
-> ([Table id] -> ShowS)
-> Show (Table id)
forall id. Show id => Int -> Table id -> ShowS
forall id. Show id => [Table id] -> ShowS
forall id. Show id => Table id -> Package
forall a.
(Int -> a -> ShowS) -> (a -> Package) -> ([a] -> ShowS) -> Show a
showList :: [Table id] -> ShowS
$cshowList :: forall id. Show id => [Table id] -> ShowS
show :: Table id -> Package
$cshow :: forall id. Show id => Table id -> Package
showsPrec :: Int -> Table id -> ShowS
$cshowsPrec :: forall id. Show id => Int -> Table id -> ShowS
Show, a -> Table b -> Table a
(a -> b) -> Table a -> Table b
(forall a b. (a -> b) -> Table a -> Table b)
-> (forall a b. a -> Table b -> Table a) -> Functor Table
forall a b. a -> Table b -> Table a
forall a b. (a -> b) -> Table a -> Table b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Table b -> Table a
$c<$ :: forall a b. a -> Table b -> Table a
fmap :: (a -> b) -> Table a -> Table b
$cfmap :: forall a b. (a -> b) -> Table a -> Table b
Functor, Table a -> Bool
(a -> m) -> Table a -> m
(a -> b -> b) -> b -> Table a -> b
(forall m. Monoid m => Table m -> m)
-> (forall m a. Monoid m => (a -> m) -> Table a -> m)
-> (forall m a. Monoid m => (a -> m) -> Table a -> m)
-> (forall a b. (a -> b -> b) -> b -> Table a -> b)
-> (forall a b. (a -> b -> b) -> b -> Table a -> b)
-> (forall b a. (b -> a -> b) -> b -> Table a -> b)
-> (forall b a. (b -> a -> b) -> b -> Table a -> b)
-> (forall a. (a -> a -> a) -> Table a -> a)
-> (forall a. (a -> a -> a) -> Table a -> a)
-> (forall a. Table a -> [a])
-> (forall a. Table a -> Bool)
-> (forall a. Table a -> Int)
-> (forall a. Eq a => a -> Table a -> Bool)
-> (forall a. Ord a => Table a -> a)
-> (forall a. Ord a => Table a -> a)
-> (forall a. Num a => Table a -> a)
-> (forall a. Num a => Table a -> a)
-> Foldable Table
forall a. Eq a => a -> Table a -> Bool
forall a. Num a => Table a -> a
forall a. Ord a => Table a -> a
forall m. Monoid m => Table m -> m
forall a. Table a -> Bool
forall a. Table a -> Int
forall a. Table a -> [a]
forall a. (a -> a -> a) -> Table a -> a
forall m a. Monoid m => (a -> m) -> Table a -> m
forall b a. (b -> a -> b) -> b -> Table a -> b
forall a b. (a -> b -> b) -> b -> Table a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: Table a -> a
$cproduct :: forall a. Num a => Table a -> a
sum :: Table a -> a
$csum :: forall a. Num a => Table a -> a
minimum :: Table a -> a
$cminimum :: forall a. Ord a => Table a -> a
maximum :: Table a -> a
$cmaximum :: forall a. Ord a => Table a -> a
elem :: a -> Table a -> Bool
$celem :: forall a. Eq a => a -> Table a -> Bool
length :: Table a -> Int
$clength :: forall a. Table a -> Int
null :: Table a -> Bool
$cnull :: forall a. Table a -> Bool
toList :: Table a -> [a]
$ctoList :: forall a. Table a -> [a]
foldl1 :: (a -> a -> a) -> Table a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> Table a -> a
foldr1 :: (a -> a -> a) -> Table a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> Table a -> a
foldl' :: (b -> a -> b) -> b -> Table a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> Table a -> b
foldl :: (b -> a -> b) -> b -> Table a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> Table a -> b
foldr' :: (a -> b -> b) -> b -> Table a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> Table a -> b
foldr :: (a -> b -> b) -> b -> Table a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> Table a -> b
foldMap' :: (a -> m) -> Table a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> Table a -> m
foldMap :: (a -> m) -> Table a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> Table a -> m
fold :: Table m -> m
$cfold :: forall m. Monoid m => Table m -> m
Foldable, Functor Table
Foldable Table
Functor Table
-> Foldable Table
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Table a -> f (Table b))
-> (forall (f :: * -> *) a.
Applicative f =>
Table (f a) -> f (Table a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Table a -> m (Table b))
-> (forall (m :: * -> *) a. Monad m => Table (m a) -> m (Table a))
-> Traversable Table
(a -> f b) -> Table a -> f (Table b)
forall (t :: * -> *).
Functor t
-> Foldable t
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a. Monad m => Table (m a) -> m (Table a)
forall (f :: * -> *) a. Applicative f => Table (f a) -> f (Table a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Table a -> m (Table b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Table a -> f (Table b)
sequence :: Table (m a) -> m (Table a)
$csequence :: forall (m :: * -> *) a. Monad m => Table (m a) -> m (Table a)
mapM :: (a -> m b) -> Table a -> m (Table b)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Table a -> m (Table b)
sequenceA :: Table (f a) -> f (Table a)
$csequenceA :: forall (f :: * -> *) a. Applicative f => Table (f a) -> f (Table a)
traverse :: (a -> f b) -> Table a -> f (Table b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> Table a -> f (Table b)
$cp2Traversable :: Foldable Table
$cp1Traversable :: Functor Table
Traversable)
data DocH mod id
= DocEmpty
| DocAppend (DocH mod id) (DocH mod id)
| DocString String
| DocParagraph (DocH mod id)
| DocIdentifier id
| DocIdentifierUnchecked mod
| DocModule (ModLink (DocH mod id))
| DocWarning (DocH mod id)
| DocEmphasis (DocH mod id)
| DocMonospaced (DocH mod id)
| DocBold (DocH mod id)
| DocUnorderedList [DocH mod id]
| DocOrderedList [(Int, DocH mod id)]
| DocDefList [(DocH mod id, DocH mod id)]
| DocCodeBlock (DocH mod id)
| DocHyperlink (Hyperlink (DocH mod id))
| DocPic Picture
| DocMathInline String
| DocMathDisplay String
| DocAName String
| DocProperty String
| DocExamples [Example]
| (Header (DocH mod id))
| DocTable (Table (DocH mod id))
deriving (DocH mod id -> DocH mod id -> Bool
(DocH mod id -> DocH mod id -> Bool)
-> (DocH mod id -> DocH mod id -> Bool) -> Eq (DocH mod id)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall mod id.
(Eq id, Eq mod) =>
DocH mod id -> DocH mod id -> Bool
/= :: DocH mod id -> DocH mod id -> Bool
$c/= :: forall mod id.
(Eq id, Eq mod) =>
DocH mod id -> DocH mod id -> Bool
== :: DocH mod id -> DocH mod id -> Bool
$c== :: forall mod id.
(Eq id, Eq mod) =>
DocH mod id -> DocH mod id -> Bool
Eq, Int -> DocH mod id -> ShowS
[DocH mod id] -> ShowS
DocH mod id -> Package
(Int -> DocH mod id -> ShowS)
-> (DocH mod id -> Package)
-> ([DocH mod id] -> ShowS)
-> Show (DocH mod id)
forall a.
(Int -> a -> ShowS) -> (a -> Package) -> ([a] -> ShowS) -> Show a
forall mod id. (Show id, Show mod) => Int -> DocH mod id -> ShowS
forall mod id. (Show id, Show mod) => [DocH mod id] -> ShowS
forall mod id. (Show id, Show mod) => DocH mod id -> Package
showList :: [DocH mod id] -> ShowS
$cshowList :: forall mod id. (Show id, Show mod) => [DocH mod id] -> ShowS
show :: DocH mod id -> Package
$cshow :: forall mod id. (Show id, Show mod) => DocH mod id -> Package
showsPrec :: Int -> DocH mod id -> ShowS
$cshowsPrec :: forall mod id. (Show id, Show mod) => Int -> DocH mod id -> ShowS
Show, a -> DocH mod b -> DocH mod a
(a -> b) -> DocH mod a -> DocH mod b
(forall a b. (a -> b) -> DocH mod a -> DocH mod b)
-> (forall a b. a -> DocH mod b -> DocH mod a)
-> Functor (DocH mod)
forall a b. a -> DocH mod b -> DocH mod a
forall a b. (a -> b) -> DocH mod a -> DocH mod b
forall mod a b. a -> DocH mod b -> DocH mod a
forall mod a b. (a -> b) -> DocH mod a -> DocH mod b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> DocH mod b -> DocH mod a
$c<$ :: forall mod a b. a -> DocH mod b -> DocH mod a
fmap :: (a -> b) -> DocH mod a -> DocH mod b
$cfmap :: forall mod a b. (a -> b) -> DocH mod a -> DocH mod b
Functor, DocH mod a -> Bool
(a -> m) -> DocH mod a -> m
(a -> b -> b) -> b -> DocH mod a -> b
(forall m. Monoid m => DocH mod m -> m)
-> (forall m a. Monoid m => (a -> m) -> DocH mod a -> m)
-> (forall m a. Monoid m => (a -> m) -> DocH mod a -> m)
-> (forall a b. (a -> b -> b) -> b -> DocH mod a -> b)
-> (forall a b. (a -> b -> b) -> b -> DocH mod a -> b)
-> (forall b a. (b -> a -> b) -> b -> DocH mod a -> b)
-> (forall b a. (b -> a -> b) -> b -> DocH mod a -> b)
-> (forall a. (a -> a -> a) -> DocH mod a -> a)
-> (forall a. (a -> a -> a) -> DocH mod a -> a)
-> (forall a. DocH mod a -> [a])
-> (forall a. DocH mod a -> Bool)
-> (forall a. DocH mod a -> Int)
-> (forall a. Eq a => a -> DocH mod a -> Bool)
-> (forall a. Ord a => DocH mod a -> a)
-> (forall a. Ord a => DocH mod a -> a)
-> (forall a. Num a => DocH mod a -> a)
-> (forall a. Num a => DocH mod a -> a)
-> Foldable (DocH mod)
forall a. Eq a => a -> DocH mod a -> Bool
forall a. Num a => DocH mod a -> a
forall a. Ord a => DocH mod a -> a
forall m. Monoid m => DocH mod m -> m
forall a. DocH mod a -> Bool
forall a. DocH mod a -> Int
forall a. DocH mod a -> [a]
forall a. (a -> a -> a) -> DocH mod a -> a
forall mod a. Eq a => a -> DocH mod a -> Bool
forall mod a. Num a => DocH mod a -> a
forall mod a. Ord a => DocH mod a -> a
forall m a. Monoid m => (a -> m) -> DocH mod a -> m
forall mod m. Monoid m => DocH mod m -> m
forall mod a. DocH mod a -> Bool
forall mod a. DocH mod a -> Int
forall mod a. DocH mod a -> [a]
forall b a. (b -> a -> b) -> b -> DocH mod a -> b
forall a b. (a -> b -> b) -> b -> DocH mod a -> b
forall mod a. (a -> a -> a) -> DocH mod a -> a
forall mod m a. Monoid m => (a -> m) -> DocH mod a -> m
forall mod b a. (b -> a -> b) -> b -> DocH mod a -> b
forall mod a b. (a -> b -> b) -> b -> DocH mod a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: DocH mod a -> a
$cproduct :: forall mod a. Num a => DocH mod a -> a
sum :: DocH mod a -> a
$csum :: forall mod a. Num a => DocH mod a -> a
minimum :: DocH mod a -> a
$cminimum :: forall mod a. Ord a => DocH mod a -> a
maximum :: DocH mod a -> a
$cmaximum :: forall mod a. Ord a => DocH mod a -> a
elem :: a -> DocH mod a -> Bool
$celem :: forall mod a. Eq a => a -> DocH mod a -> Bool
length :: DocH mod a -> Int
$clength :: forall mod a. DocH mod a -> Int
null :: DocH mod a -> Bool
$cnull :: forall mod a. DocH mod a -> Bool
toList :: DocH mod a -> [a]
$ctoList :: forall mod a. DocH mod a -> [a]
foldl1 :: (a -> a -> a) -> DocH mod a -> a
$cfoldl1 :: forall mod a. (a -> a -> a) -> DocH mod a -> a
foldr1 :: (a -> a -> a) -> DocH mod a -> a
$cfoldr1 :: forall mod a. (a -> a -> a) -> DocH mod a -> a
foldl' :: (b -> a -> b) -> b -> DocH mod a -> b
$cfoldl' :: forall mod b a. (b -> a -> b) -> b -> DocH mod a -> b
foldl :: (b -> a -> b) -> b -> DocH mod a -> b
$cfoldl :: forall mod b a. (b -> a -> b) -> b -> DocH mod a -> b
foldr' :: (a -> b -> b) -> b -> DocH mod a -> b
$cfoldr' :: forall mod a b. (a -> b -> b) -> b -> DocH mod a -> b
foldr :: (a -> b -> b) -> b -> DocH mod a -> b
$cfoldr :: forall mod a b. (a -> b -> b) -> b -> DocH mod a -> b
foldMap' :: (a -> m) -> DocH mod a -> m
$cfoldMap' :: forall mod m a. Monoid m => (a -> m) -> DocH mod a -> m
foldMap :: (a -> m) -> DocH mod a -> m
$cfoldMap :: forall mod m a. Monoid m => (a -> m) -> DocH mod a -> m
fold :: DocH mod m -> m
$cfold :: forall mod m. Monoid m => DocH mod m -> m
Foldable, Functor (DocH mod)
Foldable (DocH mod)
Functor (DocH mod)
-> Foldable (DocH mod)
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> DocH mod a -> f (DocH mod b))
-> (forall (f :: * -> *) a.
Applicative f =>
DocH mod (f a) -> f (DocH mod a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> DocH mod a -> m (DocH mod b))
-> (forall (m :: * -> *) a.
Monad m =>
DocH mod (m a) -> m (DocH mod a))
-> Traversable (DocH mod)
(a -> f b) -> DocH mod a -> f (DocH mod b)
forall mod. Functor (DocH mod)
forall mod. Foldable (DocH mod)
forall mod (m :: * -> *) a.
Monad m =>
DocH mod (m a) -> m (DocH mod a)
forall mod (f :: * -> *) a.
Applicative f =>
DocH mod (f a) -> f (DocH mod a)
forall mod (m :: * -> *) a b.
Monad m =>
(a -> m b) -> DocH mod a -> m (DocH mod b)
forall mod (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> DocH mod a -> f (DocH mod b)
forall (t :: * -> *).
Functor t
-> Foldable t
-> (forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a. Monad m => DocH mod (m a) -> m (DocH mod a)
forall (f :: * -> *) a.
Applicative f =>
DocH mod (f a) -> f (DocH mod a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> DocH mod a -> m (DocH mod b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> DocH mod a -> f (DocH mod b)
sequence :: DocH mod (m a) -> m (DocH mod a)
$csequence :: forall mod (m :: * -> *) a.
Monad m =>
DocH mod (m a) -> m (DocH mod a)
mapM :: (a -> m b) -> DocH mod a -> m (DocH mod b)
$cmapM :: forall mod (m :: * -> *) a b.
Monad m =>
(a -> m b) -> DocH mod a -> m (DocH mod b)
sequenceA :: DocH mod (f a) -> f (DocH mod a)
$csequenceA :: forall mod (f :: * -> *) a.
Applicative f =>
DocH mod (f a) -> f (DocH mod a)
traverse :: (a -> f b) -> DocH mod a -> f (DocH mod b)
$ctraverse :: forall mod (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> DocH mod a -> f (DocH mod b)
$cp2Traversable :: forall mod. Foldable (DocH mod)
$cp1Traversable :: forall mod. Functor (DocH mod)
Traversable)
#if MIN_VERSION_base(4,8,0)
instance Bifunctor DocH where
bimap :: (a -> b) -> (c -> d) -> DocH a c -> DocH b d
bimap a -> b
_ c -> d
_ DocH a c
DocEmpty = DocH b d
forall mod id. DocH mod id
DocEmpty
bimap a -> b
f c -> d
g (DocAppend DocH a c
docA DocH a c
docB) = DocH b d -> DocH b d -> DocH b d
forall mod id. DocH mod id -> DocH mod id -> DocH mod id
DocAppend ((a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g DocH a c
docA) ((a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g DocH a c
docB)
bimap a -> b
_ c -> d
_ (DocString Package
s) = Package -> DocH b d
forall mod id. Package -> DocH mod id
DocString Package
s
bimap a -> b
f c -> d
g (DocParagraph DocH a c
doc) = DocH b d -> DocH b d
forall mod id. DocH mod id -> DocH mod id
DocParagraph ((a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g DocH a c
doc)
bimap a -> b
_ c -> d
g (DocIdentifier c
i) = d -> DocH b d
forall mod id. id -> DocH mod id
DocIdentifier (c -> d
g c
i)
bimap a -> b
f c -> d
_ (DocIdentifierUnchecked a
m) = b -> DocH b d
forall mod id. mod -> DocH mod id
DocIdentifierUnchecked (a -> b
f a
m)
bimap a -> b
f c -> d
g (DocModule (ModLink Package
m Maybe (DocH a c)
lbl)) = ModLink (DocH b d) -> DocH b d
forall mod id. ModLink (DocH mod id) -> DocH mod id
DocModule (Package -> Maybe (DocH b d) -> ModLink (DocH b d)
forall id. Package -> Maybe id -> ModLink id
ModLink Package
m ((DocH a c -> DocH b d) -> Maybe (DocH a c) -> Maybe (DocH b d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ((a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g) Maybe (DocH a c)
lbl))
bimap a -> b
f c -> d
g (DocWarning DocH a c
doc) = DocH b d -> DocH b d
forall mod id. DocH mod id -> DocH mod id
DocWarning ((a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g DocH a c
doc)
bimap a -> b
f c -> d
g (DocEmphasis DocH a c
doc) = DocH b d -> DocH b d
forall mod id. DocH mod id -> DocH mod id
DocEmphasis ((a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g DocH a c
doc)
bimap a -> b
f c -> d
g (DocMonospaced DocH a c
doc) = DocH b d -> DocH b d
forall mod id. DocH mod id -> DocH mod id
DocMonospaced ((a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g DocH a c
doc)
bimap a -> b
f c -> d
g (DocBold DocH a c
doc) = DocH b d -> DocH b d
forall mod id. DocH mod id -> DocH mod id
DocBold ((a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g DocH a c
doc)
bimap a -> b
f c -> d
g (DocUnorderedList [DocH a c]
docs) = [DocH b d] -> DocH b d
forall mod id. [DocH mod id] -> DocH mod id
DocUnorderedList ((DocH a c -> DocH b d) -> [DocH a c] -> [DocH b d]
forall a b. (a -> b) -> [a] -> [b]
map ((a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g) [DocH a c]
docs)
bimap a -> b
f c -> d
g (DocOrderedList [(Int, DocH a c)]
docs) = [(Int, DocH b d)] -> DocH b d
forall mod id. [(Int, DocH mod id)] -> DocH mod id
DocOrderedList (((Int, DocH a c) -> (Int, DocH b d))
-> [(Int, DocH a c)] -> [(Int, DocH b d)]
forall a b. (a -> b) -> [a] -> [b]
map (\(Int
index, DocH a c
a) -> (Int
index, (a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g DocH a c
a)) [(Int, DocH a c)]
docs)
bimap a -> b
f c -> d
g (DocDefList [(DocH a c, DocH a c)]
docs) = [(DocH b d, DocH b d)] -> DocH b d
forall mod id. [(DocH mod id, DocH mod id)] -> DocH mod id
DocDefList (((DocH a c, DocH a c) -> (DocH b d, DocH b d))
-> [(DocH a c, DocH a c)] -> [(DocH b d, DocH b d)]
forall a b. (a -> b) -> [a] -> [b]
map ((a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g (DocH a c -> DocH b d)
-> (DocH a c -> DocH b d)
-> (DocH a c, DocH a c)
-> (DocH b d, DocH b d)
forall (a :: * -> * -> *) b c b' c'.
Arrow a =>
a b c -> a b' c' -> a (b, b') (c, c')
*** (a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g) [(DocH a c, DocH a c)]
docs)
bimap a -> b
f c -> d
g (DocCodeBlock DocH a c
doc) = DocH b d -> DocH b d
forall mod id. DocH mod id -> DocH mod id
DocCodeBlock ((a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g DocH a c
doc)
bimap a -> b
f c -> d
g (DocHyperlink (Hyperlink Package
url Maybe (DocH a c)
lbl)) = Hyperlink (DocH b d) -> DocH b d
forall mod id. Hyperlink (DocH mod id) -> DocH mod id
DocHyperlink (Package -> Maybe (DocH b d) -> Hyperlink (DocH b d)
forall id. Package -> Maybe id -> Hyperlink id
Hyperlink Package
url ((DocH a c -> DocH b d) -> Maybe (DocH a c) -> Maybe (DocH b d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ((a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g) Maybe (DocH a c)
lbl))
bimap a -> b
_ c -> d
_ (DocPic Picture
picture) = Picture -> DocH b d
forall mod id. Picture -> DocH mod id
DocPic Picture
picture
bimap a -> b
_ c -> d
_ (DocMathInline Package
s) = Package -> DocH b d
forall mod id. Package -> DocH mod id
DocMathInline Package
s
bimap a -> b
_ c -> d
_ (DocMathDisplay Package
s) = Package -> DocH b d
forall mod id. Package -> DocH mod id
DocMathDisplay Package
s
bimap a -> b
_ c -> d
_ (DocAName Package
s) = Package -> DocH b d
forall mod id. Package -> DocH mod id
DocAName Package
s
bimap a -> b
_ c -> d
_ (DocProperty Package
s) = Package -> DocH b d
forall mod id. Package -> DocH mod id
DocProperty Package
s
bimap a -> b
_ c -> d
_ (DocExamples [Example]
examples) = [Example] -> DocH b d
forall mod id. [Example] -> DocH mod id
DocExamples [Example]
examples
bimap a -> b
f c -> d
g (DocHeader (Header Int
level DocH a c
title)) = Header (DocH b d) -> DocH b d
forall mod id. Header (DocH mod id) -> DocH mod id
DocHeader (Int -> DocH b d -> Header (DocH b d)
forall id. Int -> id -> Header id
Header Int
level ((a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g DocH a c
title))
bimap a -> b
f c -> d
g (DocTable (Table [TableRow (DocH a c)]
header [TableRow (DocH a c)]
body)) = Table (DocH b d) -> DocH b d
forall mod id. Table (DocH mod id) -> DocH mod id
DocTable ([TableRow (DocH b d)] -> [TableRow (DocH b d)] -> Table (DocH b d)
forall id. [TableRow id] -> [TableRow id] -> Table id
Table ((TableRow (DocH a c) -> TableRow (DocH b d))
-> [TableRow (DocH a c)] -> [TableRow (DocH b d)]
forall a b. (a -> b) -> [a] -> [b]
map ((DocH a c -> DocH b d)
-> TableRow (DocH a c) -> TableRow (DocH b d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ((a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g)) [TableRow (DocH a c)]
header) ((TableRow (DocH a c) -> TableRow (DocH b d))
-> [TableRow (DocH a c)] -> [TableRow (DocH b d)]
forall a b. (a -> b) -> [a] -> [b]
map ((DocH a c -> DocH b d)
-> TableRow (DocH a c) -> TableRow (DocH b d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ((a -> b) -> (c -> d) -> DocH a c -> DocH b d
forall (p :: * -> * -> *) a b c d.
Bifunctor p =>
(a -> b) -> (c -> d) -> p a c -> p b d
bimap a -> b
f c -> d
g)) [TableRow (DocH a c)]
body))
#endif
#if MIN_VERSION_base(4,10,0)
instance Bifoldable DocH where
bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
bifoldr a -> c -> c
f b -> c -> c
g c
z (DocAppend DocH a b
docA DocH a b
docB) = (a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
forall (p :: * -> * -> *) a c b.
Bifoldable p =>
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldr a -> c -> c
f b -> c -> c
g ((a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
forall (p :: * -> * -> *) a c b.
Bifoldable p =>
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldr a -> c -> c
f b -> c -> c
g c
z DocH a b
docA) DocH a b
docB
bifoldr a -> c -> c
f b -> c -> c
g c
z (DocParagraph DocH a b
doc) = (a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
forall (p :: * -> * -> *) a c b.
Bifoldable p =>
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldr a -> c -> c
f b -> c -> c
g c
z DocH a b
doc
bifoldr a -> c -> c
_ b -> c -> c
g c
z (DocIdentifier b
i) = b -> c -> c
g b
i c
z
bifoldr a -> c -> c
f b -> c -> c
_ c
z (DocIdentifierUnchecked a
m) = a -> c -> c
f a
m c
z
bifoldr a -> c -> c
f b -> c -> c
g c
z (DocWarning DocH a b
doc) = (a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
forall (p :: * -> * -> *) a c b.
Bifoldable p =>
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldr a -> c -> c
f b -> c -> c
g c
z DocH a b
doc
bifoldr a -> c -> c
f b -> c -> c
g c
z (DocEmphasis DocH a b
doc) = (a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
forall (p :: * -> * -> *) a c b.
Bifoldable p =>
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldr a -> c -> c
f b -> c -> c
g c
z DocH a b
doc
bifoldr a -> c -> c
f b -> c -> c
g c
z (DocMonospaced DocH a b
doc) = (a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
forall (p :: * -> * -> *) a c b.
Bifoldable p =>
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldr a -> c -> c
f b -> c -> c
g c
z DocH a b
doc
bifoldr a -> c -> c
f b -> c -> c
g c
z (DocBold DocH a b
doc) = (a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
forall (p :: * -> * -> *) a c b.
Bifoldable p =>
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldr a -> c -> c
f b -> c -> c
g c
z DocH a b
doc
bifoldr a -> c -> c
f b -> c -> c
g c
z (DocUnorderedList [DocH a b]
docs) = (DocH a b -> c -> c) -> c -> [DocH a b] -> c
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr ((c -> DocH a b -> c) -> DocH a b -> c -> c
forall a b c. (a -> b -> c) -> b -> a -> c
flip ((a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
forall (p :: * -> * -> *) a c b.
Bifoldable p =>
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldr a -> c -> c
f b -> c -> c
g)) c
z [DocH a b]
docs
bifoldr a -> c -> c
f b -> c -> c
g c
z (DocOrderedList [(Int, DocH a b)]
docs) = (DocH a b -> c -> c) -> c -> [DocH a b] -> c
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr ((c -> DocH a b -> c) -> DocH a b -> c -> c
forall a b c. (a -> b -> c) -> b -> a -> c
flip ((a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
forall (p :: * -> * -> *) a c b.
Bifoldable p =>
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldr a -> c -> c
f b -> c -> c
g)) c
z (((Int, DocH a b) -> DocH a b) -> [(Int, DocH a b)] -> [DocH a b]
forall a b. (a -> b) -> [a] -> [b]
map (Int, DocH a b) -> DocH a b
forall a b. (a, b) -> b
snd [(Int, DocH a b)]
docs)
bifoldr a -> c -> c
f b -> c -> c
g c
z (DocDefList [(DocH a b, DocH a b)]
docs) = ((DocH a b, DocH a b) -> c -> c)
-> c -> [(DocH a b, DocH a b)] -> c
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr (\(DocH a b
l, DocH a b
r) c
acc -> (a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
forall (p :: * -> * -> *) a c b.
Bifoldable p =>
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldr a -> c -> c
f b -> c -> c
g ((a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
forall (p :: * -> * -> *) a c b.
Bifoldable p =>
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldr a -> c -> c
f b -> c -> c
g c
acc DocH a b
l) DocH a b
r) c
z [(DocH a b, DocH a b)]
docs
bifoldr a -> c -> c
f b -> c -> c
g c
z (DocCodeBlock DocH a b
doc) = (a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
forall (p :: * -> * -> *) a c b.
Bifoldable p =>
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldr a -> c -> c
f b -> c -> c
g c
z DocH a b
doc
bifoldr a -> c -> c
f b -> c -> c
g c
z (DocHeader (Header Int
_ DocH a b
title)) = (a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
forall (p :: * -> * -> *) a c b.
Bifoldable p =>
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldr a -> c -> c
f b -> c -> c
g c
z DocH a b
title
bifoldr a -> c -> c
f b -> c -> c
g c
z (DocTable (Table [TableRow (DocH a b)]
header [TableRow (DocH a b)]
body)) = (TableRow (DocH a b) -> c -> c) -> c -> [TableRow (DocH a b)] -> c
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr (\TableRow (DocH a b)
r c
acc -> (DocH a b -> c -> c) -> c -> TableRow (DocH a b) -> c
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr ((c -> DocH a b -> c) -> DocH a b -> c -> c
forall a b c. (a -> b -> c) -> b -> a -> c
flip ((a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
forall (p :: * -> * -> *) a c b.
Bifoldable p =>
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldr a -> c -> c
f b -> c -> c
g)) c
acc TableRow (DocH a b)
r) ((TableRow (DocH a b) -> c -> c) -> c -> [TableRow (DocH a b)] -> c
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr (\TableRow (DocH a b)
r c
acc -> (DocH a b -> c -> c) -> c -> TableRow (DocH a b) -> c
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr ((c -> DocH a b -> c) -> DocH a b -> c -> c
forall a b c. (a -> b -> c) -> b -> a -> c
flip ((a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c
forall (p :: * -> * -> *) a c b.
Bifoldable p =>
(a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c
bifoldr a -> c -> c
f b -> c -> c
g)) c
acc TableRow (DocH a b)
r) c
z [TableRow (DocH a b)]
body) [TableRow (DocH a b)]
header
bifoldr a -> c -> c
_ b -> c -> c
_ c
z DocH a b
_ = c
z
instance Bitraversable DocH where
bitraverse :: (a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
bitraverse a -> f c
_ b -> f d
_ DocH a b
DocEmpty = DocH c d -> f (DocH c d)
forall (f :: * -> *) a. Applicative f => a -> f a
pure DocH c d
forall mod id. DocH mod id
DocEmpty
bitraverse a -> f c
f b -> f d
g (DocAppend DocH a b
docA DocH a b
docB) = DocH c d -> DocH c d -> DocH c d
forall mod id. DocH mod id -> DocH mod id -> DocH mod id
DocAppend (DocH c d -> DocH c d -> DocH c d)
-> f (DocH c d) -> f (DocH c d -> DocH c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g DocH a b
docA f (DocH c d -> DocH c d) -> f (DocH c d) -> f (DocH c d)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g DocH a b
docB
bitraverse a -> f c
_ b -> f d
_ (DocString Package
s) = DocH c d -> f (DocH c d)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Package -> DocH c d
forall mod id. Package -> DocH mod id
DocString Package
s)
bitraverse a -> f c
f b -> f d
g (DocParagraph DocH a b
doc) = DocH c d -> DocH c d
forall mod id. DocH mod id -> DocH mod id
DocParagraph (DocH c d -> DocH c d) -> f (DocH c d) -> f (DocH c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g DocH a b
doc
bitraverse a -> f c
_ b -> f d
g (DocIdentifier b
i) = d -> DocH c d
forall mod id. id -> DocH mod id
DocIdentifier (d -> DocH c d) -> f d -> f (DocH c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> b -> f d
g b
i
bitraverse a -> f c
f b -> f d
_ (DocIdentifierUnchecked a
m) = c -> DocH c d
forall mod id. mod -> DocH mod id
DocIdentifierUnchecked (c -> DocH c d) -> f c -> f (DocH c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> a -> f c
f a
m
bitraverse a -> f c
f b -> f d
g (DocModule (ModLink Package
m Maybe (DocH a b)
lbl)) = ModLink (DocH c d) -> DocH c d
forall mod id. ModLink (DocH mod id) -> DocH mod id
DocModule (ModLink (DocH c d) -> DocH c d)
-> f (ModLink (DocH c d)) -> f (DocH c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Package -> Maybe (DocH c d) -> ModLink (DocH c d)
forall id. Package -> Maybe id -> ModLink id
ModLink Package
m (Maybe (DocH c d) -> ModLink (DocH c d))
-> f (Maybe (DocH c d)) -> f (ModLink (DocH c d))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (DocH a b -> f (DocH c d))
-> Maybe (DocH a b) -> f (Maybe (DocH c d))
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g) Maybe (DocH a b)
lbl)
bitraverse a -> f c
f b -> f d
g (DocWarning DocH a b
doc) = DocH c d -> DocH c d
forall mod id. DocH mod id -> DocH mod id
DocWarning (DocH c d -> DocH c d) -> f (DocH c d) -> f (DocH c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g DocH a b
doc
bitraverse a -> f c
f b -> f d
g (DocEmphasis DocH a b
doc) = DocH c d -> DocH c d
forall mod id. DocH mod id -> DocH mod id
DocEmphasis (DocH c d -> DocH c d) -> f (DocH c d) -> f (DocH c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g DocH a b
doc
bitraverse a -> f c
f b -> f d
g (DocMonospaced DocH a b
doc) = DocH c d -> DocH c d
forall mod id. DocH mod id -> DocH mod id
DocMonospaced (DocH c d -> DocH c d) -> f (DocH c d) -> f (DocH c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g DocH a b
doc
bitraverse a -> f c
f b -> f d
g (DocBold DocH a b
doc) = DocH c d -> DocH c d
forall mod id. DocH mod id -> DocH mod id
DocBold (DocH c d -> DocH c d) -> f (DocH c d) -> f (DocH c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g DocH a b
doc
bitraverse a -> f c
f b -> f d
g (DocUnorderedList [DocH a b]
docs) = [DocH c d] -> DocH c d
forall mod id. [DocH mod id] -> DocH mod id
DocUnorderedList ([DocH c d] -> DocH c d) -> f [DocH c d] -> f (DocH c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (DocH a b -> f (DocH c d)) -> [DocH a b] -> f [DocH c d]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g) [DocH a b]
docs
bitraverse a -> f c
f b -> f d
g (DocOrderedList [(Int, DocH a b)]
docs) = [(Int, DocH c d)] -> DocH c d
forall mod id. [(Int, DocH mod id)] -> DocH mod id
DocOrderedList ([(Int, DocH c d)] -> DocH c d)
-> f [(Int, DocH c d)] -> f (DocH c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (DocH a b -> f (DocH c d))
-> [(Int, DocH a b)] -> f [(Int, DocH c d)]
forall (t :: * -> *) (f :: * -> *) t b a.
(Traversable t, Applicative f) =>
(t -> f b) -> t (a, t) -> f (t (a, b))
traverseSnd ((a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g) [(Int, DocH a b)]
docs
where traverseSnd :: (t -> f b) -> t (a, t) -> f (t (a, b))
traverseSnd t -> f b
f' = ((a, t) -> f (a, b)) -> t (a, t) -> f (t (a, b))
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (\(a
x, t
a) -> (\b
b -> (a
x, b
b)) (b -> (a, b)) -> f b -> f (a, b)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> t -> f b
f' t
a)
bitraverse a -> f c
f b -> f d
g (DocDefList [(DocH a b, DocH a b)]
docs) = [(DocH c d, DocH c d)] -> DocH c d
forall mod id. [(DocH mod id, DocH mod id)] -> DocH mod id
DocDefList ([(DocH c d, DocH c d)] -> DocH c d)
-> f [(DocH c d, DocH c d)] -> f (DocH c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ((DocH a b, DocH a b) -> f (DocH c d, DocH c d))
-> [(DocH a b, DocH a b)] -> f [(DocH c d, DocH c d)]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((DocH a b -> f (DocH c d))
-> (DocH a b -> f (DocH c d))
-> (DocH a b, DocH a b)
-> f (DocH c d, DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse ((a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g) ((a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g)) [(DocH a b, DocH a b)]
docs
bitraverse a -> f c
f b -> f d
g (DocCodeBlock DocH a b
doc) = DocH c d -> DocH c d
forall mod id. DocH mod id -> DocH mod id
DocCodeBlock (DocH c d -> DocH c d) -> f (DocH c d) -> f (DocH c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g DocH a b
doc
bitraverse a -> f c
f b -> f d
g (DocHyperlink (Hyperlink Package
url Maybe (DocH a b)
lbl)) = Hyperlink (DocH c d) -> DocH c d
forall mod id. Hyperlink (DocH mod id) -> DocH mod id
DocHyperlink (Hyperlink (DocH c d) -> DocH c d)
-> f (Hyperlink (DocH c d)) -> f (DocH c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Package -> Maybe (DocH c d) -> Hyperlink (DocH c d)
forall id. Package -> Maybe id -> Hyperlink id
Hyperlink Package
url (Maybe (DocH c d) -> Hyperlink (DocH c d))
-> f (Maybe (DocH c d)) -> f (Hyperlink (DocH c d))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (DocH a b -> f (DocH c d))
-> Maybe (DocH a b) -> f (Maybe (DocH c d))
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g) Maybe (DocH a b)
lbl)
bitraverse a -> f c
_ b -> f d
_ (DocPic Picture
picture) = DocH c d -> f (DocH c d)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Picture -> DocH c d
forall mod id. Picture -> DocH mod id
DocPic Picture
picture)
bitraverse a -> f c
_ b -> f d
_ (DocMathInline Package
s) = DocH c d -> f (DocH c d)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Package -> DocH c d
forall mod id. Package -> DocH mod id
DocMathInline Package
s)
bitraverse a -> f c
_ b -> f d
_ (DocMathDisplay Package
s) = DocH c d -> f (DocH c d)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Package -> DocH c d
forall mod id. Package -> DocH mod id
DocMathDisplay Package
s)
bitraverse a -> f c
_ b -> f d
_ (DocAName Package
s) = DocH c d -> f (DocH c d)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Package -> DocH c d
forall mod id. Package -> DocH mod id
DocAName Package
s)
bitraverse a -> f c
_ b -> f d
_ (DocProperty Package
s) = DocH c d -> f (DocH c d)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Package -> DocH c d
forall mod id. Package -> DocH mod id
DocProperty Package
s)
bitraverse a -> f c
_ b -> f d
_ (DocExamples [Example]
examples) = DocH c d -> f (DocH c d)
forall (f :: * -> *) a. Applicative f => a -> f a
pure ([Example] -> DocH c d
forall mod id. [Example] -> DocH mod id
DocExamples [Example]
examples)
bitraverse a -> f c
f b -> f d
g (DocHeader (Header Int
level DocH a b
title)) = (Header (DocH c d) -> DocH c d
forall mod id. Header (DocH mod id) -> DocH mod id
DocHeader (Header (DocH c d) -> DocH c d)
-> (DocH c d -> Header (DocH c d)) -> DocH c d -> DocH c d
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> DocH c d -> Header (DocH c d)
forall id. Int -> id -> Header id
Header Int
level) (DocH c d -> DocH c d) -> f (DocH c d) -> f (DocH c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g DocH a b
title
bitraverse a -> f c
f b -> f d
g (DocTable (Table [TableRow (DocH a b)]
header [TableRow (DocH a b)]
body)) = (\[TableRow (DocH c d)]
h [TableRow (DocH c d)]
b -> Table (DocH c d) -> DocH c d
forall mod id. Table (DocH mod id) -> DocH mod id
DocTable ([TableRow (DocH c d)] -> [TableRow (DocH c d)] -> Table (DocH c d)
forall id. [TableRow id] -> [TableRow id] -> Table id
Table [TableRow (DocH c d)]
h [TableRow (DocH c d)]
b)) ([TableRow (DocH c d)] -> [TableRow (DocH c d)] -> DocH c d)
-> f [TableRow (DocH c d)] -> f ([TableRow (DocH c d)] -> DocH c d)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (TableRow (DocH a b) -> f (TableRow (DocH c d)))
-> [TableRow (DocH a b)] -> f [TableRow (DocH c d)]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((DocH a b -> f (DocH c d))
-> TableRow (DocH a b) -> f (TableRow (DocH c d))
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g)) [TableRow (DocH a b)]
header f ([TableRow (DocH c d)] -> DocH c d)
-> f [TableRow (DocH c d)] -> f (DocH c d)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (TableRow (DocH a b) -> f (TableRow (DocH c d)))
-> [TableRow (DocH a b)] -> f [TableRow (DocH c d)]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((DocH a b -> f (DocH c d))
-> TableRow (DocH a b) -> f (TableRow (DocH c d))
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse ((a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d)
forall (t :: * -> * -> *) (f :: * -> *) a c b d.
(Bitraversable t, Applicative f) =>
(a -> f c) -> (b -> f d) -> t a b -> f (t c d)
bitraverse a -> f c
f b -> f d
g)) [TableRow (DocH a b)]
body
#endif
data Namespace = Value | Type | None deriving (Namespace -> Namespace -> Bool
(Namespace -> Namespace -> Bool)
-> (Namespace -> Namespace -> Bool) -> Eq Namespace
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Namespace -> Namespace -> Bool
$c/= :: Namespace -> Namespace -> Bool
== :: Namespace -> Namespace -> Bool
$c== :: Namespace -> Namespace -> Bool
Eq, Eq Namespace
Eq Namespace
-> (Namespace -> Namespace -> Ordering)
-> (Namespace -> Namespace -> Bool)
-> (Namespace -> Namespace -> Bool)
-> (Namespace -> Namespace -> Bool)
-> (Namespace -> Namespace -> Bool)
-> (Namespace -> Namespace -> Namespace)
-> (Namespace -> Namespace -> Namespace)
-> Ord Namespace
Namespace -> Namespace -> Bool
Namespace -> Namespace -> Ordering
Namespace -> Namespace -> Namespace
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Namespace -> Namespace -> Namespace
$cmin :: Namespace -> Namespace -> Namespace
max :: Namespace -> Namespace -> Namespace
$cmax :: Namespace -> Namespace -> Namespace
>= :: Namespace -> Namespace -> Bool
$c>= :: Namespace -> Namespace -> Bool
> :: Namespace -> Namespace -> Bool
$c> :: Namespace -> Namespace -> Bool
<= :: Namespace -> Namespace -> Bool
$c<= :: Namespace -> Namespace -> Bool
< :: Namespace -> Namespace -> Bool
$c< :: Namespace -> Namespace -> Bool
compare :: Namespace -> Namespace -> Ordering
$ccompare :: Namespace -> Namespace -> Ordering
$cp1Ord :: Eq Namespace
Ord, Int -> Namespace
Namespace -> Int
Namespace -> [Namespace]
Namespace -> Namespace
Namespace -> Namespace -> [Namespace]
Namespace -> Namespace -> Namespace -> [Namespace]
(Namespace -> Namespace)
-> (Namespace -> Namespace)
-> (Int -> Namespace)
-> (Namespace -> Int)
-> (Namespace -> [Namespace])
-> (Namespace -> Namespace -> [Namespace])
-> (Namespace -> Namespace -> [Namespace])
-> (Namespace -> Namespace -> Namespace -> [Namespace])
-> Enum Namespace
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: Namespace -> Namespace -> Namespace -> [Namespace]
$cenumFromThenTo :: Namespace -> Namespace -> Namespace -> [Namespace]
enumFromTo :: Namespace -> Namespace -> [Namespace]
$cenumFromTo :: Namespace -> Namespace -> [Namespace]
enumFromThen :: Namespace -> Namespace -> [Namespace]
$cenumFromThen :: Namespace -> Namespace -> [Namespace]
enumFrom :: Namespace -> [Namespace]
$cenumFrom :: Namespace -> [Namespace]
fromEnum :: Namespace -> Int
$cfromEnum :: Namespace -> Int
toEnum :: Int -> Namespace
$ctoEnum :: Int -> Namespace
pred :: Namespace -> Namespace
$cpred :: Namespace -> Namespace
succ :: Namespace -> Namespace
$csucc :: Namespace -> Namespace
Enum, Int -> Namespace -> ShowS
[Namespace] -> ShowS
Namespace -> Package
(Int -> Namespace -> ShowS)
-> (Namespace -> Package)
-> ([Namespace] -> ShowS)
-> Show Namespace
forall a.
(Int -> a -> ShowS) -> (a -> Package) -> ([a] -> ShowS) -> Show a
showList :: [Namespace] -> ShowS
$cshowList :: [Namespace] -> ShowS
show :: Namespace -> Package
$cshow :: Namespace -> Package
showsPrec :: Int -> Namespace -> ShowS
$cshowsPrec :: Int -> Namespace -> ShowS
Show)
renderNs :: Namespace -> String
renderNs :: Namespace -> Package
renderNs Namespace
Value = Package
"v"
renderNs Namespace
Type = Package
"t"
renderNs Namespace
None = Package
""
data DocMarkupH mod id a = Markup
{ DocMarkupH mod id a -> a
markupEmpty :: a
, DocMarkupH mod id a -> Package -> a
markupString :: String -> a
, DocMarkupH mod id a -> a -> a
markupParagraph :: a -> a
, DocMarkupH mod id a -> a -> a -> a
markupAppend :: a -> a -> a
, DocMarkupH mod id a -> id -> a
markupIdentifier :: id -> a
, DocMarkupH mod id a -> mod -> a
markupIdentifierUnchecked :: mod -> a
, DocMarkupH mod id a -> ModLink a -> a
markupModule :: ModLink a -> a
, DocMarkupH mod id a -> a -> a
markupWarning :: a -> a
, DocMarkupH mod id a -> a -> a
markupEmphasis :: a -> a
, DocMarkupH mod id a -> a -> a
markupBold :: a -> a
, DocMarkupH mod id a -> a -> a
markupMonospaced :: a -> a
, DocMarkupH mod id a -> [a] -> a
markupUnorderedList :: [a] -> a
, DocMarkupH mod id a -> [(Int, a)] -> a
markupOrderedList :: [(Int,a)] -> a
, DocMarkupH mod id a -> [(a, a)] -> a
markupDefList :: [(a,a)] -> a
, DocMarkupH mod id a -> a -> a
markupCodeBlock :: a -> a
, DocMarkupH mod id a -> Hyperlink a -> a
markupHyperlink :: Hyperlink a -> a
, DocMarkupH mod id a -> Package -> a
markupAName :: String -> a
, DocMarkupH mod id a -> Picture -> a
markupPic :: Picture -> a
, DocMarkupH mod id a -> Package -> a
markupMathInline :: String -> a
, DocMarkupH mod id a -> Package -> a
markupMathDisplay :: String -> a
, DocMarkupH mod id a -> Package -> a
markupProperty :: String -> a
, DocMarkupH mod id a -> [Example] -> a
markupExample :: [Example] -> a
, :: Header a -> a
, DocMarkupH mod id a -> Table a -> a
markupTable :: Table a -> a
}