dispatch ∷ α
→ CI Text
→ [ByteString]
- → IO (Maybe ([ByteString], ResourceDef))
+ → IO (Maybe ([ByteString], Resource))
dispatcher ∷ α → Dispatcher
{-# INLINE dispatcher #-}
Nothing → dispatch β host path
-- |An IO-based dispatcher returning resource paths as well as
--- 'ResourceDef's.
+-- 'Resource's.
instance Dispatchable (CI Text
→ [ByteString]
- → IO (Maybe ([ByteString], ResourceDef))) where
+ → IO (Maybe ([ByteString], Resource))) where
dispatch = id
-- |An IO-based dispatcher.
-instance Dispatchable (CI Text → [ByteString] → IO (Maybe ResourceDef)) where
+instance Dispatchable (CI Text → [ByteString] → IO (Maybe Resource)) where
dispatch = ((((<$>) ∘ (<$>)) ((,) []) ∘) ∘)
-- |A pure dispatcher.
-instance Dispatchable (CI Text → [ByteString] → Maybe ResourceDef) where
+instance Dispatchable (CI Text → [ByteString] → Maybe Resource) where
dispatch = (((return ∘ ((,) [] <$>)) ∘) ∘)
-- |An IO-based dispatcher ignoring host names.
-instance Dispatchable ([ByteString] → IO (Maybe ResourceDef)) where
+instance Dispatchable ([ByteString] → IO (Maybe Resource)) where
dispatch = const ∘ (((<$>) ∘ (<$>)) ((,) []) ∘)
-- |A pure dispatcher ignoring host names.
-instance Dispatchable ([ByteString] → Maybe ResourceDef) where
+instance Dispatchable ([ByteString] → Maybe Resource) where
dispatch = const ∘ ((return ∘ ((,) [] <$>)) ∘)
--- |The constant dispatcher returning always the same 'ResourceDef'.
-instance Dispatchable ResourceDef where
+-- |The constant dispatcher returning always the same 'Resource'.
+instance Dispatchable Resource where
dispatch = const ∘ const ∘ return ∘ Just ∘ (,) []
-- |The empty dispatcher returning always 'Nothing'.