-- |FIXME: doc
instance Monoid Dispatcher where
{-# INLINE mempty #-}
- mempty = dispatcher f
- where
- f ∷ CI Text → [ByteString] → IO (Maybe ([ByteString], ResourceDef))
- f _ _ = return Nothing
+ mempty = dispatcher (return Nothing ∷ IO (Maybe ResourceDef))
{-# INLINEABLE mappend #-}
mappend (Dispatcher α) (Dispatcher β)
→ IO (Maybe ([ByteString], ResourceDef))) where
findResource = id
-instance Dispatchable (CI Text
- → [ByteString]
- → Maybe ([ByteString], ResourceDef)) where
- findResource = ((return ∘) ∘)
-
-instance Dispatchable (CI Text
- → [ByteString]
- → IO (Maybe ResourceDef)) where
+instance Dispatchable (CI Text → [ByteString] → IO (Maybe ResourceDef)) where
findResource = ((((<$>) ∘ (<$>)) ((,) []) ∘) ∘)
-instance Dispatchable (CI Text
- → [ByteString]
- → Maybe ResourceDef) where
+instance Dispatchable (CI Text → [ByteString] → Maybe ResourceDef) where
findResource = (((return ∘ ((,) [] <$>)) ∘) ∘)
-instance Dispatchable ([ByteString]
- → IO (Maybe ([ByteString], ResourceDef))) where
- findResource = const
-
-instance Dispatchable ([ByteString]
- → Maybe ([ByteString], ResourceDef)) where
- findResource = const ∘ (return ∘)
-
-instance Dispatchable ([ByteString]
- → IO (Maybe ResourceDef)) where
+instance Dispatchable ([ByteString] → IO (Maybe ResourceDef)) where
findResource = const ∘ (((<$>) ∘ (<$>)) ((,) []) ∘)
-instance Dispatchable ([ByteString]
- → Maybe ResourceDef) where
+instance Dispatchable ([ByteString] → Maybe ResourceDef) where
findResource = const ∘ ((return ∘ ((,) [] <$>)) ∘)
-instance Dispatchable (IO (Maybe ([ByteString], ResourceDef))) where
- findResource = const ∘ const
-
-instance Dispatchable ([ByteString], ResourceDef) where
- findResource = const ∘ const ∘ return ∘ Just
-
instance Dispatchable (IO (Maybe ResourceDef)) where
findResource = const ∘ const ∘ ((<$>) ∘ (<$>)) ((,) [])