--- /dev/null
+{-# LANGUAGE
+ DeriveDataTypeable
+ , GeneralizedNewtypeDeriving
+ , StandaloneDeriving
+ , UnicodeSyntax
+ #-}
+module Data.URI.Internal.Scheme
+ ( Scheme
+ , unsafeCreateScheme
+ )
+ where
+import Data.Ascii (CIAscii)
+import Data.CaseInsensitive
+import Data.Hashable
+import Data.String
+import Data.Typeable
+
+-- |'Scheme' names consist of a non-empty sequence of characters
+-- beginning with a letter and followed by any combination of letters,
+-- digits, plus (\'+\'), period (\'.\'), or hyphen (\'-\'):
+-- <http://tools.ietf.org/html/rfc3986#section-3.1>
+newtype Scheme = Scheme CIAscii
+ deriving ( Eq
+ , FoldCase
+ , Hashable
+ , Ord
+ , Show
+ , Typeable
+ )
+-- scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
+
+-- |'isString' is a fast but unsafe way to create 'Scheme' such that
+-- no validation on the string is performed.
+deriving instance IsString Scheme
+
+-- |Converts a 'CIAscii' to 'Scheme' without any validation on the
+-- string.
+unsafeCreateScheme ∷ CIAscii → Scheme
+{-# INLINE CONLIKE unsafeCreateScheme #-}
+unsafeCreateScheme = Scheme
data-default == 0.3.*,
directory == 1.1.*,
filepath == 1.2.*,
+ hashable == 1.1.*,
mtl == 2.0.*,
network == 2.3.*,
old-time == 1.0.*,
-DHAVE_SSL
Exposed-Modules:
+ Data.URI
Data.Collections.Newtype.TH
Network.HTTP.Lucu
Network.HTTP.Lucu.Abortion
Network.HTTP.Lucu.Utils
Other-Modules:
+ Data.URI.Internal.Scheme
Network.HTTP.Lucu.Abortion.Internal
Network.HTTP.Lucu.Chunk
Network.HTTP.Lucu.ContentCoding