{-# INLINE fromBS #-}
fromBS = Scheme ∘ A.toCIAscii ∘ A.unsafeFromByteString
+-- |Extract a 'CIAscii' with all letters lowercased.
instance ConvertSuccess Scheme CIAscii where
{-# INLINE convertSuccess #-}
convertSuccess (Scheme s) = foldCase s
+-- |Create an 'AsciiBuilder' with all letters lowercased.
instance ConvertSuccess Scheme AsciiBuilder where
{-# INLINE convertSuccess #-}
convertSuccess = A.toAsciiBuilder ∘ A.fromCIAscii ∘ cs
+-- |Try to parse a 'Scheme' from 'CIAscii'.
instance ConvertAttempt CIAscii Scheme where
{-# INLINE convertAttempt #-}
convertAttempt = parseAttempt' def ∘ A.fromCIAscii