]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Resource/Dispatcher.hs
Rename: Resource --> Rsrc; ResourceDef --> Resource
[Lucu.git] / Network / HTTP / Lucu / Resource / Dispatcher.hs
index 7b1ac43f485436734a249aa2e6b4228374bae4fe..ffaba2d1ec114e49a3a22eb900a1bc81d286055e 100644 (file)
@@ -22,7 +22,7 @@ class Dispatchable α where
     dispatch ∷ α
              → CI Text
              → [ByteString]
     dispatch ∷ α
              → CI Text
              → [ByteString]
-             → IO (Maybe ([ByteString], ResourceDef))
+             → IO (Maybe ([ByteString], Resource))
 
     dispatcher ∷ α → Dispatcher
     {-# INLINE dispatcher #-}
 
     dispatcher ∷ α → Dispatcher
     {-# INLINE dispatcher #-}
@@ -50,30 +50,30 @@ instance Monoid Dispatcher where
                               Nothing → dispatch β host path
 
 -- |An IO-based dispatcher returning resource paths as well as
                               Nothing → dispatch β host path
 
 -- |An IO-based dispatcher returning resource paths as well as
--- 'ResourceDef's.
+-- 'Resource's.
 instance Dispatchable (CI Text
                        → [ByteString]
 instance Dispatchable (CI Text
                        → [ByteString]
-                       → IO (Maybe ([ByteString], ResourceDef))) where
+                       → IO (Maybe ([ByteString], Resource))) where
     dispatch = id
 
 -- |An IO-based dispatcher.
     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.
     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.
     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.
     dispatch = const ∘ (((<$>) ∘ (<$>)) ((,) []) ∘)
 
 -- |A pure dispatcher ignoring host names.
-instance Dispatchable ([ByteString] → Maybe ResourceDef) where
+instance Dispatchable ([ByteString] → Maybe Resource) where
     dispatch = const ∘ ((return ∘ ((,) [] <$>)) ∘)
 
     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'.
     dispatch = const ∘ const ∘ return ∘ Just ∘ (,) []
 
 -- |The empty dispatcher returning always 'Nothing'.