    {-# OPTIONS -fno-warn-orphans #-}
    module Debian.Version.Text
        ( ParseDebianVersion(..)
        ) where

    import Text.ParserCombinators.Parsec

    import qualified Data.Text as T

    import Debian.Version.Common
    import Debian.Version.Internal

    instance ParseDebianVersion T.Text where
        parseDebianVersion :: Text -> Either ParseError DebianVersion
    parseDebianVersion Text
    text =
            let str :: [Char]
    str = Text -> [Char]
    T.unpack Text
    text in
            case Parsec [Char] () (Found Int, NonNumeric, Found NonNumeric)
    -> [Char]
    -> [Char]
    -> Either ParseError (Found Int, NonNumeric, Found NonNumeric)
    forall s t a.
    Stream s Identity t =>
    Parsec s () a -> [Char] -> s -> Either ParseError a
    parse Parsec [Char] () (Found Int, NonNumeric, Found NonNumeric)
    parseDV [Char]
    str [Char]
    str of
              Left ParseError
    e -> ParseError -> Either ParseError DebianVersion
    forall a b. a -> Either a b
    Left ParseError
    e
              Right (Found Int, NonNumeric, Found NonNumeric)
    dv -> DebianVersion -> Either ParseError DebianVersion
    forall a b. b -> Either a b
    Right ([Char]
    -> (Found Int, NonNumeric, Found NonNumeric) -> DebianVersion
    DebianVersion [Char]
    str (Found Int, NonNumeric, Found NonNumeric)
    dv)