]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Router.hs
working on Router
[Lucu.git] / Network / HTTP / Lucu / Router.hs
index 657df3bb19cc76ea748edd0c008324a991c0c55c..8624f53aa8312d514f5ca9af0e2fe70366c85f89 100644 (file)
@@ -13,7 +13,6 @@ module Network.HTTP.Lucu.Router
 
       -- * Testing for URI scheme
     , anyScheme
-    , schemeWith
     , scheme
     , http
     , http'
@@ -57,22 +56,15 @@ anyScheme ∷ Arrow (⇝) ⇒ URI ⇝ (Host, Path)
 anyScheme = arr uriHost &&& arr uriPathSegments
 
 -- |FIXME: doc
-schemeWith ∷ (ArrowChoice (⇝), ArrowZero (⇝))
-           ⇒ (CIAscii → Bool)
-           → URI ⇝ (Host, Path)
-{-# INLINEABLE schemeWith #-}
-schemeWith f
+scheme ∷ (ArrowChoice (⇝), ArrowZero (⇝)) ⇒ CIAscii → URI ⇝ (Host, Path)
+{-# INLINEABLE scheme #-}
+scheme s
     = proc uri →
-      if f (uriCIScheme uri) then
+      if s ≡ uriCIScheme uri then
           anyScheme ⤙ uri
       else
           zeroArrow ⤙ (⊥)
 
--- |@'scheme' s@ = @'schemeWith' ('==' s)@
-scheme ∷ (ArrowChoice (⇝), ArrowZero (⇝)) ⇒ CIAscii → URI ⇝ (Host, Path)
-{-# INLINE scheme #-}
-scheme = schemeWith ∘ (≡)
-
 -- |@'http' = 'scheme' \"http\" '<+>' 'scheme' \"https\"@
 http ∷ (ArrowChoice (⇝), ArrowPlus (⇝), ArrowZero (⇝)) ⇒ URI ⇝ (Host, Path)
 {-# INLINE http #-}