X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Data%2FURI%2FInternal.hs;fp=Data%2FURI%2FInternal.hs;h=0000000000000000000000000000000000000000;hb=892db773d625001f773aa66f19bbb0d0008341d2;hp=ffb8a7bb51cf4f57e06d0e0326f8740ae8d288d5;hpb=ceb6901059c21991562e5ad4ffe3d6558d44309e;p=Lucu.git diff --git a/Data/URI/Internal.hs b/Data/URI/Internal.hs deleted file mode 100644 index ffb8a7b..0000000 --- a/Data/URI/Internal.hs +++ /dev/null @@ -1,37 +0,0 @@ -{-# LANGUAGE - UnicodeSyntax - #-} -module Data.URI.Internal - ( finishOff - , parseAttempt - , parseAttempt' - ) - where -import Control.Applicative -import Control.Exception.Base -import Control.Monad.Unicode -import Data.Ascii (Ascii) -import qualified Data.Ascii as A -import Data.Attempt -import Data.Attoparsec.Char8 -import Data.ByteString (ByteString) -import Prelude.Unicode - -finishOff ∷ Parser α → Parser α -{-# INLINE finishOff #-} -finishOff = ((endOfInput *>) ∘ return =≪) - -parseAttempt ∷ Exception e - ⇒ (String → e) - → Parser α - → ByteString - → Attempt α -{-# INLINEABLE parseAttempt #-} -parseAttempt f p bs - = case parseOnly (finishOff p) bs of - Right α → Success α - Left e → Failure $ f e - -parseAttempt' ∷ Parser α → Ascii → Attempt α -{-# INLINE parseAttempt' #-} -parseAttempt' = (∘ A.toByteString) ∘ parseAttempt StringException