-- |FIXME: doc
instance Monoid Dispatcher where
{-# INLINE mempty #-}
- mempty = dispatcher (return Nothing ∷ IO (Maybe ResourceDef))
+ mempty = dispatcher ()
{-# INLINEABLE mappend #-}
mappend (Dispatcher α) (Dispatcher β)
instance Dispatchable (IO (Maybe ResourceDef)) where
dispatch = const ∘ const ∘ ((<$>) ∘ (<$>)) ((,) [])
+-- |The constant dispatcher returning always the same 'ResourceDef'.
instance Dispatchable ResourceDef where
dispatch = const ∘ const ∘ return ∘ Just ∘ (,) []
+
+-- |The empty dispatcher returning always 'Nothing'.
+instance Dispatchable () where
+ dispatch _ _ _ = return Nothing
\ No newline at end of file