@@ -64,10 +64,14 @@ data CombinedRenderable a b = CombinedRenderable a b
64-- | Combine two renderables. The url will always be taken from the first
64-- | Combine two renderables. The url will always be taken from the first
65-- "Renderable". Also, if a `$key` is present in both renderables, the
65-- "Renderable". Also, if a `$key` is present in both renderables, the
66-- value from the first "Renderable" will be taken as well.
66-- value from the first "Renderable" will be taken as well.
68+-- Since renderables are always more or less key-value maps, you can see
69+-- this as a @union@ between two maps.
67combine :: (Renderable a, Renderable b) => a -> b -> CombinedRenderable a b
70combine :: (Renderable a, Renderable b) => a -> b -> CombinedRenderable a b
68combine = CombinedRenderable
71combine = CombinedRenderable
70−-- | Combine two renderables and set a custom URL.
73+-- | Combine two renderables and set a custom URL. This behaves like "combine",
74+-- except that for the @url@ field, the given URL is always chosen.
71combineWithURL :: (Renderable a, Renderable b)
75combineWithURL :: (Renderable a, Renderable b)
72 => FilePath
76 => FilePath
@@ -75,7 +79,7 @@ combineWithURL :: (Renderable a, Renderable b)
75 -> CombinedRenderable a b
79 -> CombinedRenderable a b
76combineWithURL = CombinedRenderableWithURL
80combineWithURL = CombinedRenderableWithURL
78−-- | Render combinations.
82+-- Render combinations.
79instance (Renderable a, Renderable b)
83instance (Renderable a, Renderable b)
80 => Renderable (CombinedRenderable a b) where
84 => Renderable (CombinedRenderable a b) where