-- |The phantom type for conversion between ANSI C's @asctime()@
-- string and 'LocalTime'.
+--
+-- >>> convertSuccess (LocalTime (ModifiedJulianDay 49662) (TimeOfDay 8 49 37))
+-- Tagged "Sun Nov 6 08:49:37 1994"
data Asctime
instance ConvertSuccess LocalTime (Tagged Asctime Ascii) where
parseAttempt' ∷ Parser α → Ascii → Attempt α
{-# INLINE parseAttempt' #-}
-parseAttempt' p a = parseAttempt h p bs
- where
- h ∷ String → StringException
- h _ = StringException $ A.toString a
-
- bs ∷ ByteString
- bs = A.toByteString a
+parseAttempt' = (∘ A.toByteString) ∘ parseAttempt StringException