-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Modules for working with the Debian package system
--   
--   This library includes modules covering some basic data types defined
--   by the Debian policy manual - version numbers, control file syntax,
--   etc.
@package debian
@version 4.1.2

module Debian.Arch
data Arch
Source :: Arch
All :: Arch
Binary :: ArchOS -> ArchCPU -> Arch
data ArchOS
ArchOS :: String -> ArchOS
ArchOSAny :: ArchOS
data ArchCPU
ArchCPU :: String -> ArchCPU
ArchCPUAny :: ArchCPU
prettyArch :: Arch -> Doc
parseArch :: String -> Arch
instance GHC.Internal.Data.Data.Data Debian.Arch.Arch
instance GHC.Internal.Data.Data.Data Debian.Arch.ArchCPU
instance GHC.Internal.Data.Data.Data Debian.Arch.ArchOS
instance GHC.Classes.Eq Debian.Arch.Arch
instance GHC.Classes.Eq Debian.Arch.ArchCPU
instance GHC.Classes.Eq Debian.Arch.ArchOS
instance GHC.Classes.Ord Debian.Arch.Arch
instance GHC.Classes.Ord Debian.Arch.ArchCPU
instance GHC.Classes.Ord Debian.Arch.ArchOS
instance GHC.Internal.Read.Read Debian.Arch.Arch
instance GHC.Internal.Read.Read Debian.Arch.ArchCPU
instance GHC.Internal.Read.Read Debian.Arch.ArchOS
instance GHC.Internal.Show.Show Debian.Arch.Arch
instance GHC.Internal.Show.Show Debian.Arch.ArchCPU
instance GHC.Internal.Show.Show Debian.Arch.ArchOS

-- | Domain independent functions used by the haskell-debian package.
module Debian.Extra.Files
withTemporaryFile :: MonadIO m => (FilePath -> m a) -> String -> m a

module Debian.Loc
__LOC__ :: Q Exp
mapExn :: forall e m a. (MonadCatch m, Exception e) => m a -> (e -> e) -> m a

-- | A constructor we can wrap around values to avoid any built in Pretty
--   instance - for example, instance Pretty [a].
--   
--   
--   
- display is now prettyShow
--   
- display' is now prettyText
--   
- ppDisplay is now ppShow
--   
- ppDisplay' is now ppText
--   
module Debian.Pretty

-- | This type is wrapped around values before we pretty print them so we
--   can write our own Pretty instances for common types without polluting
--   the name space of clients of this package with instances they don't
--   want.
newtype PP a
PP :: a -> PP a
[unPP] :: PP a -> a
prettyText :: Pretty a => a -> Text
ppPrint :: Pretty (PP a) => a -> Doc
ppShow :: Pretty (PP a) => a -> String
ppText :: Pretty (PP a) => a -> Text
prettyShow :: Pretty a => a -> String
instance GHC.Internal.Base.Functor Debian.Pretty.PP
instance Distribution.Pretty.Pretty (Debian.Pretty.PP Data.Text.Internal.Text)
instance Distribution.Pretty.Pretty (Debian.Pretty.PP GHC.Internal.Base.String)
instance Distribution.Pretty.Pretty (Debian.Pretty.PP a) => Distribution.Pretty.Pretty (Debian.Pretty.PP (GHC.Internal.Maybe.Maybe a))

module Debian.Control.Common
newtype Control' a
Control :: [Paragraph' a] -> Control' a
[unControl] :: Control' a -> [Paragraph' a]
newtype Paragraph' a
Paragraph :: [Field' a] -> Paragraph' a

-- | NOTE: we do not strip the leading or trailing whitespace in the name
--   or value
data Field' a
Field :: (a, a) -> Field' a

-- | Lines beginning with #
Comment :: a -> Field' a
class ControlFunctions a

-- | parseControlFromFile filepath is a simple wrapper
--   function that parses filepath using pControl
parseControlFromFile :: ControlFunctions a => FilePath -> IO (Either ParseError (Control' a))

-- | parseControlFromHandle sourceName handle -
--   sourceName is only used for error reporting
parseControlFromHandle :: ControlFunctions a => String -> Handle -> IO (Either ParseError (Control' a))

-- | parseControlFromString sourceName text -
--   sourceName is only used for error reporting
parseControl :: ControlFunctions a => String -> a -> Either ParseError (Control' a)

-- | lookupP fieldName paragraph looks up a Field in
--   a Paragraph. N.B. trailing and leading whitespace is
--   not stripped.
lookupP :: ControlFunctions a => String -> Paragraph' a -> Maybe (Field' a)

-- | Strip the trailing and leading space and tab characters from a string.
--   Folded whitespace is not unfolded. This should probably be
--   moved to someplace more general purpose.
stripWS :: ControlFunctions a => a -> a

-- | Protect field value text so the parser doesn't split it into multiple
--   fields or paragraphs. This must modify all field text to enforce two
--   conditions: (1) All lines other than the initial one must begin with a
--   space or a tab, and (2) the trailing white space must not contain
--   newlines. This is called before pretty printing to prevent the parser
--   from misinterpreting field text as multiple fields or paragraphs.
protectFieldText :: ControlFunctions a => a -> a
asString :: ControlFunctions a => a -> String
mergeControls :: [Control' a] -> Control' a
fieldValue :: ControlFunctions a => String -> Paragraph' a -> Maybe a
removeField :: Eq a => a -> Paragraph' a -> Paragraph' a
prependFields :: [Field' a] -> Paragraph' a -> Paragraph' a
appendFields :: [Field' a] -> Paragraph' a -> Paragraph' a
renameField :: Eq a => a -> a -> Paragraph' a -> Paragraph' a
modifyField :: Eq a => a -> (a -> a) -> Paragraph' a -> Paragraph' a

-- | Move selected fields to the beginning of a paragraph.
raiseFields :: Eq a => (a -> Bool) -> Paragraph' a -> Paragraph' a

-- | Run a command and parse its output as a control file.
parseControlFromCmd :: ControlFunctions a => String -> IO (Either String (Control' a))

-- | look up the md5sum file in a paragraph Tries several different
--   variations: MD5Sum: Md5Sum: MD5sum:
md5sumField :: ControlFunctions a => Paragraph' a -> Maybe a

-- | This can usually be used as the implementation of protectFieldText
protectFieldText' :: (StringLike a, ListLike a Char, ControlFunctions a) => a -> a
instance GHC.Classes.Eq a => GHC.Classes.Eq (Debian.Control.Common.Control' a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Debian.Control.Common.Field' a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Debian.Control.Common.Paragraph' a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Debian.Control.Common.Control' a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Debian.Control.Common.Field' a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (Debian.Control.Common.Paragraph' a)
instance (Debian.Control.Common.ControlFunctions a, Distribution.Pretty.Pretty (Debian.Pretty.PP a)) => Distribution.Pretty.Pretty (Debian.Control.Common.Control' a)
instance (Debian.Control.Common.ControlFunctions a, Distribution.Pretty.Pretty (Debian.Pretty.PP a)) => Distribution.Pretty.Pretty (Debian.Control.Common.Field' a)
instance (Debian.Control.Common.ControlFunctions a, Distribution.Pretty.Pretty (Debian.Pretty.PP a)) => Distribution.Pretty.Pretty (Debian.Control.Common.Paragraph' a)
instance GHC.Internal.Read.Read a => GHC.Internal.Read.Read (Debian.Control.Common.Control' a)
instance GHC.Internal.Read.Read a => GHC.Internal.Read.Read (Debian.Control.Common.Field' a)
instance GHC.Internal.Read.Read a => GHC.Internal.Read.Read (Debian.Control.Common.Paragraph' a)
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Debian.Control.Common.Control' a)
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Debian.Control.Common.Field' a)
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Debian.Control.Common.Paragraph' a)

module Debian.Deb
fields :: ControlFunctions a => FilePath -> IO (Control' a)

module Debian.Control.String
newtype Control' a
Control :: [Paragraph' a] -> Control' a
newtype Paragraph' a
Paragraph :: [Field' a] -> Paragraph' a

-- | NOTE: we do not strip the leading or trailing whitespace in the name
--   or value
data Field' a
Field :: (a, a) -> Field' a

-- | Lines beginning with #
Comment :: a -> Field' a
type Control = Control' String
type Paragraph = Paragraph' String
type Field = Field' String
type ControlParser a = CharParser () a
class ControlFunctions a

-- | parseControlFromFile filepath is a simple wrapper
--   function that parses filepath using pControl
parseControlFromFile :: ControlFunctions a => FilePath -> IO (Either ParseError (Control' a))

-- | parseControlFromHandle sourceName handle -
--   sourceName is only used for error reporting
parseControlFromHandle :: ControlFunctions a => String -> Handle -> IO (Either ParseError (Control' a))

-- | parseControlFromString sourceName text -
--   sourceName is only used for error reporting
parseControl :: ControlFunctions a => String -> a -> Either ParseError (Control' a)

-- | lookupP fieldName paragraph looks up a Field in
--   a Paragraph. N.B. trailing and leading whitespace is
--   not stripped.
lookupP :: ControlFunctions a => String -> Paragraph' a -> Maybe (Field' a)

-- | Strip the trailing and leading space and tab characters from a string.
--   Folded whitespace is not unfolded. This should probably be
--   moved to someplace more general purpose.
stripWS :: ControlFunctions a => a -> a

-- | Protect field value text so the parser doesn't split it into multiple
--   fields or paragraphs. This must modify all field text to enforce two
--   conditions: (1) All lines other than the initial one must begin with a
--   space or a tab, and (2) the trailing white space must not contain
--   newlines. This is called before pretty printing to prevent the parser
--   from misinterpreting field text as multiple fields or paragraphs.
protectFieldText :: ControlFunctions a => a -> a
asString :: ControlFunctions a => a -> String

-- | A parser for debian control file. This parser handles control files
--   that end without a newline as well as ones that have several blank
--   lines at the end. It is very liberal and does not attempt validate the
--   fields in any way. All trailing, leading, and folded whitespace is
--   preserved in the field values. See stripWS.
pControl :: ControlParser Control
mergeControls :: [Control' a] -> Control' a
fieldValue :: ControlFunctions a => String -> Paragraph' a -> Maybe a
removeField :: Eq a => a -> Paragraph' a -> Paragraph' a
prependFields :: [Field' a] -> Paragraph' a -> Paragraph' a
appendFields :: [Field' a] -> Paragraph' a -> Paragraph' a
renameField :: Eq a => a -> a -> Paragraph' a -> Paragraph' a
modifyField :: Eq a => a -> (a -> a) -> Paragraph' a -> Paragraph' a

-- | Move selected fields to the beginning of a paragraph.
raiseFields :: Eq a => (a -> Bool) -> Paragraph' a -> Paragraph' a
instance Debian.Control.Common.ControlFunctions GHC.Internal.Base.String

module Debian.Control.ByteString
newtype Control' a
Control :: [Paragraph' a] -> Control' a
[unControl] :: Control' a -> [Paragraph' a]
newtype Paragraph' a
Paragraph :: [Field' a] -> Paragraph' a

-- | NOTE: we do not strip the leading or trailing whitespace in the name
--   or value
data Field' a
Field :: (a, a) -> Field' a

-- | Lines beginning with #
Comment :: a -> Field' a
type Control = Control' ByteString
type Paragraph = Paragraph' ByteString
type Field = Field' ByteString
class ControlFunctions a

-- | parseControlFromFile filepath is a simple wrapper
--   function that parses filepath using pControl
parseControlFromFile :: ControlFunctions a => FilePath -> IO (Either ParseError (Control' a))

-- | parseControlFromHandle sourceName handle -
--   sourceName is only used for error reporting
parseControlFromHandle :: ControlFunctions a => String -> Handle -> IO (Either ParseError (Control' a))

-- | parseControlFromString sourceName text -
--   sourceName is only used for error reporting
parseControl :: ControlFunctions a => String -> a -> Either ParseError (Control' a)

-- | lookupP fieldName paragraph looks up a Field in
--   a Paragraph. N.B. trailing and leading whitespace is
--   not stripped.
lookupP :: ControlFunctions a => String -> Paragraph' a -> Maybe (Field' a)

-- | Strip the trailing and leading space and tab characters from a string.
--   Folded whitespace is not unfolded. This should probably be
--   moved to someplace more general purpose.
stripWS :: ControlFunctions a => a -> a

-- | Protect field value text so the parser doesn't split it into multiple
--   fields or paragraphs. This must modify all field text to enforce two
--   conditions: (1) All lines other than the initial one must begin with a
--   space or a tab, and (2) the trailing white space must not contain
--   newlines. This is called before pretty printing to prevent the parser
--   from misinterpreting field text as multiple fields or paragraphs.
protectFieldText :: ControlFunctions a => a -> a
asString :: ControlFunctions a => a -> String
mergeControls :: [Control' a] -> Control' a
fieldValue :: ControlFunctions a => String -> Paragraph' a -> Maybe a
removeField :: Eq a => a -> Paragraph' a -> Paragraph' a
prependFields :: [Field' a] -> Paragraph' a -> Paragraph' a
appendFields :: [Field' a] -> Paragraph' a -> Paragraph' a
renameField :: Eq a => a -> a -> Paragraph' a -> Paragraph' a
modifyField :: Eq a => a -> (a -> a) -> Paragraph' a -> Paragraph' a

-- | Move selected fields to the beginning of a paragraph.
raiseFields :: Eq a => (a -> Bool) -> Paragraph' a -> Paragraph' a
instance GHC.Internal.Base.Alternative (Debian.Control.ByteString.Parser state)
instance GHC.Internal.Base.Applicative (Debian.Control.ByteString.Parser state)
instance Debian.Control.Common.ControlFunctions Data.ByteString.Internal.Type.ByteString
instance GHC.Internal.Base.Functor (Debian.Control.ByteString.Parser state)
instance GHC.Internal.Base.Monad (Debian.Control.ByteString.Parser state)
instance GHC.Internal.Base.MonadPlus (Debian.Control.ByteString.Parser state)
instance GHC.Internal.Show.Show a => GHC.Internal.Show.Show (Debian.Control.ByteString.Result a)

module Debian.Control.TextLazy
newtype Control' a
Control :: [Paragraph' a] -> Control' a
[unControl] :: Control' a -> [Paragraph' a]
newtype Paragraph' a
Paragraph :: [Field' a] -> Paragraph' a

-- | NOTE: we do not strip the leading or trailing whitespace in the name
--   or value
data Field' a
Field :: (a, a) -> Field' a

-- | Lines beginning with #
Comment :: a -> Field' a
type Control = Control' Text
type Paragraph = Paragraph' Text

-- | parseFromFile p filePath runs a string parser p on
--   the input read from filePath using readFile. Returns
--   either a ParseError (Left) or a value of type
--   a (Right).
--   
--   
--   main    = do{ result <- parseFromFile numbers "digits.txt"
--               ; case result of
--                   Left err  -> print err
--                   Right xs  -> print (sum xs)
--               }
--   
type Field = Field' Text
class ControlFunctions a

-- | parseControlFromFile filepath is a simple wrapper
--   function that parses filepath using pControl
parseControlFromFile :: ControlFunctions a => FilePath -> IO (Either ParseError (Control' a))

-- | parseControlFromHandle sourceName handle -
--   sourceName is only used for error reporting
parseControlFromHandle :: ControlFunctions a => String -> Handle -> IO (Either ParseError (Control' a))

-- | parseControlFromString sourceName text -
--   sourceName is only used for error reporting
parseControl :: ControlFunctions a => String -> a -> Either ParseError (Control' a)

-- | lookupP fieldName paragraph looks up a Field in
--   a Paragraph. N.B. trailing and leading whitespace is
--   not stripped.
lookupP :: ControlFunctions a => String -> Paragraph' a -> Maybe (Field' a)

-- | Strip the trailing and leading space and tab characters from a string.
--   Folded whitespace is not unfolded. This should probably be
--   moved to someplace more general purpose.
stripWS :: ControlFunctions a => a -> a

-- | Protect field value text so the parser doesn't split it into multiple
--   fields or paragraphs. This must modify all field text to enforce two
--   conditions: (1) All lines other than the initial one must begin with a
--   space or a tab, and (2) the trailing white space must not contain
--   newlines. This is called before pretty printing to prevent the parser
--   from misinterpreting field text as multiple fields or paragraphs.
protectFieldText :: ControlFunctions a => a -> a
asString :: ControlFunctions a => a -> String
mergeControls :: [Control' a] -> Control' a
fieldValue :: ControlFunctions a => String -> Paragraph' a -> Maybe a
removeField :: Eq a => a -> Paragraph' a -> Paragraph' a
prependFields :: [Field' a] -> Paragraph' a -> Paragraph' a
appendFields :: [Field' a] -> Paragraph' a -> Paragraph' a
renameField :: Eq a => a -> a -> Paragraph' a -> Paragraph' a
modifyField :: Eq a => a -> (a -> a) -> Paragraph' a -> Paragraph' a

-- | Move selected fields to the beginning of a paragraph.
raiseFields :: Eq a => (a -> Bool) -> Paragraph' a -> Paragraph' a
decodeControl :: Control -> Control
decodeParagraph :: Paragraph -> Paragraph
decodeField :: Field' ByteString -> Field' Text
instance Debian.Control.Common.ControlFunctions Data.Text.Internal.Lazy.Text

module Debian.Control.Text
newtype Control' a
Control :: [Paragraph' a] -> Control' a
[unControl] :: Control' a -> [Paragraph' a]
newtype Paragraph' a
Paragraph :: [Field' a] -> Paragraph' a

-- | NOTE: we do not strip the leading or trailing whitespace in the name
--   or value
data Field' a
Field :: (a, a) -> Field' a

-- | Lines beginning with #
Comment :: a -> Field' a
type Control = Control' Text
type Paragraph = Paragraph' Text

-- | parseFromFile p filePath runs a string parser p on
--   the input read from filePath using readFile. Returns
--   either a ParseError (Left) or a value of type
--   a (Right).
--   
--   
--   main    = do{ result <- parseFromFile numbers "digits.txt"
--               ; case result of
--                   Left err  -> print err
--                   Right xs  -> print (sum xs)
--               }
--   
type Field = Field' Text
class ControlFunctions a

-- | parseControlFromFile filepath is a simple wrapper
--   function that parses filepath using pControl
parseControlFromFile :: ControlFunctions a => FilePath -> IO (Either ParseError (Control' a))

-- | parseControlFromHandle sourceName handle -
--   sourceName is only used for error reporting
parseControlFromHandle :: ControlFunctions a => String -> Handle -> IO (Either ParseError (Control' a))

-- | parseControlFromString sourceName text -
--   sourceName is only used for error reporting
parseControl :: ControlFunctions a => String -> a -> Either ParseError (Control' a)

-- | lookupP fieldName paragraph looks up a Field in
--   a Paragraph. N.B. trailing and leading whitespace is
--   not stripped.
lookupP :: ControlFunctions a => String -> Paragraph' a -> Maybe (Field' a)

-- | Strip the trailing and leading space and tab characters from a string.
--   Folded whitespace is not unfolded. This should probably be
--   moved to someplace more general purpose.
stripWS :: ControlFunctions a => a -> a

-- | Protect field value text so the parser doesn't split it into multiple
--   fields or paragraphs. This must modify all field text to enforce two
--   conditions: (1) All lines other than the initial one must begin with a
--   space or a tab, and (2) the trailing white space must not contain
--   newlines. This is called before pretty printing to prevent the parser
--   from misinterpreting field text as multiple fields or paragraphs.
protectFieldText :: ControlFunctions a => a -> a
asString :: ControlFunctions a => a -> String
mergeControls :: [Control' a] -> Control' a
fieldValue :: ControlFunctions a => String -> Paragraph' a -> Maybe a
removeField :: Eq a => a -> Paragraph' a -> Paragraph' a
prependFields :: [Field' a] -> Paragraph' a -> Paragraph' a
appendFields :: [Field' a] -> Paragraph' a -> Paragraph' a
renameField :: Eq a => a -> a -> Paragraph' a -> Paragraph' a
modifyField :: Eq a => a -> (a -> a) -> Paragraph' a -> Paragraph' a

-- | Move selected fields to the beginning of a paragraph.
raiseFields :: Eq a => (a -> Bool) -> Paragraph' a -> Paragraph' a
decodeControl :: Control -> Control
decodeParagraph :: Paragraph -> Paragraph
decodeField :: Field' ByteString -> Field' Text
instance Debian.Control.Common.ControlFunctions Data.Text.Internal.Text

module Debian.Control.Builder
newtype Control' a
Control :: [Paragraph' a] -> Control' a
[unControl] :: Control' a -> [Paragraph' a]
newtype Paragraph' a
Paragraph :: [Field' a] -> Paragraph' a

-- | NOTE: we do not strip the leading or trailing whitespace in the name
--   or value
data Field' a
Field :: (a, a) -> Field' a

-- | Lines beginning with #
Comment :: a -> Field' a
type Control = Control' Builder
type Paragraph = Paragraph' Builder

-- | parseFromFile p filePath runs a string parser p on
--   the input read from filePath using readFile. Returns
--   either a ParseError (Left) or a value of type
--   a (Right).
--   
--   
--   main    = do{ result <- parseFromFile numbers "digits.txt"
--               ; case result of
--                   Left err  -> print err
--                   Right xs  -> print (sum xs)
--               }
--   
type Field = Field' Builder
class ControlFunctions a

-- | parseControlFromFile filepath is a simple wrapper
--   function that parses filepath using pControl
parseControlFromFile :: ControlFunctions a => FilePath -> IO (Either ParseError (Control' a))

-- | parseControlFromHandle sourceName handle -
--   sourceName is only used for error reporting
parseControlFromHandle :: ControlFunctions a => String -> Handle -> IO (Either ParseError (Control' a))

-- | parseControlFromString sourceName text -
--   sourceName is only used for error reporting
parseControl :: ControlFunctions a => String -> a -> Either ParseError (Control' a)

-- | lookupP fieldName paragraph looks up a Field in
--   a Paragraph. N.B. trailing and leading whitespace is
--   not stripped.
lookupP :: ControlFunctions a => String -> Paragraph' a -> Maybe (Field' a)

-- | Strip the trailing and leading space and tab characters from a string.
--   Folded whitespace is not unfolded. This should probably be
--   moved to someplace more general purpose.
stripWS :: ControlFunctions a => a -> a

-- | Protect field value text so the parser doesn't split it into multiple
--   fields or paragraphs. This must modify all field text to enforce two
--   conditions: (1) All lines other than the initial one must begin with a
--   space or a tab, and (2) the trailing white space must not contain
--   newlines. This is called before pretty printing to prevent the parser
--   from misinterpreting field text as multiple fields or paragraphs.
protectFieldText :: ControlFunctions a => a -> a
asString :: ControlFunctions a => a -> String
mergeControls :: [Control' a] -> Control' a
fieldValue :: ControlFunctions a => String -> Paragraph' a -> Maybe a
removeField :: Eq a => a -> Paragraph' a -> Paragraph' a
prependFields :: [Field' a] -> Paragraph' a -> Paragraph' a
appendFields :: [Field' a] -> Paragraph' a -> Paragraph' a
renameField :: Eq a => a -> a -> Paragraph' a -> Paragraph' a
modifyField :: Eq a => a -> (a -> a) -> Paragraph' a -> Paragraph' a

-- | Move selected fields to the beginning of a paragraph.
raiseFields :: Eq a => (a -> Bool) -> Paragraph' a -> Paragraph' a
decodeControl :: Control -> Control
decodeParagraph :: Paragraph -> Paragraph
decodeField :: Field' ByteString -> Field' Builder
instance Debian.Control.Common.ControlFunctions Data.Text.Internal.Builder.Builder

-- | This module name is spurious - Release is not an official term
--   in the debian documentation.
module Debian.Release

-- | A section of a repository such as main, contrib, non-free, restricted.
--   The indexes for a section are located below the distribution
--   directory.
newtype Section
Section :: String -> Section

-- | A package's subsection is only evident in its control information,
--   packages from different subsections all reside in the same index.
data SubSection
SubSection :: Section -> String -> SubSection
[section] :: SubSection -> Section
[subSectionName] :: SubSection -> String
sectionName :: SubSection -> String
sectionName' :: Section -> String
sectionNameOfSubSection :: SubSection -> String

-- | Parse the value that appears in the Section field of a
--   .changes file. (Does this need to be unesacped?)
parseSection :: String -> SubSection
parseSection' :: String -> Section
instance GHC.Classes.Eq Debian.Release.Section
instance GHC.Classes.Eq Debian.Release.SubSection
instance GHC.Classes.Ord Debian.Release.Section
instance GHC.Classes.Ord Debian.Release.SubSection
instance GHC.Internal.Read.Read Debian.Release.Section
instance GHC.Internal.Read.Read Debian.Release.SubSection
instance GHC.Internal.Show.Show Debian.Release.Section
instance GHC.Internal.Show.Show Debian.Release.SubSection

module Debian.TH
here :: ExpQ
data Loc
instance Distribution.Pretty.Pretty [Language.Haskell.TH.Syntax.Loc]
instance Distribution.Pretty.Pretty Language.Haskell.TH.Syntax.Loc

module Debian.Codename
data Codename
Codename :: String -> Codename
codename :: Codename -> String
parseCodename :: String -> Codename
instance GHC.Internal.Data.Data.Data Debian.Codename.Codename
instance GHC.Classes.Eq Debian.Codename.Codename
instance GHC.Classes.Ord Debian.Codename.Codename
instance Distribution.Pretty.Pretty Debian.Codename.Codename
instance GHC.Internal.Read.Read Debian.Codename.Codename
instance GHC.Internal.Show.Show Debian.Codename.Codename

module Debian.Time
rfc822DateFormat' :: String
epochTimeToUTCTime :: EpochTime -> UTCTime
formatTimeRFC822 :: FormatTime t => t -> String
parseTimeRFC822 :: ParseTime t => String -> Maybe t
getCurrentLocalRFC822Time :: IO String

module Debian.URI

-- | Type for authority value within a URI
data URIAuth
URIAuth :: String -> String -> String -> URIAuth

-- | 
--   anonymous@
--   
[uriUserInfo] :: URIAuth -> String

-- | 
--   www.haskell.org
--   
[uriRegName] :: URIAuth -> String

-- | 
--   :42
--   
[uriPort] :: URIAuth -> String

-- | Represents a general universal resource identifier using its component
--   parts.
--   
--   For example, for the URI
--   
--   
--   foo://anonymous@www.haskell.org:42/ghc?query#frag
--   
--   
--   the components are:
data URI
URI :: String -> Maybe URIAuth -> String -> String -> String -> URI

-- | 
--   foo:
--   
[uriScheme] :: URI -> String

-- | 
--   //anonymous@www.haskell.org:42
--   
[uriAuthority] :: URI -> Maybe URIAuth

-- | 
--   /ghc
--   
[uriPath] :: URI -> String

-- | 
--   ?query
--   
[uriQuery] :: URI -> String

-- | 
--   #frag
--   
[uriFragment] :: URI -> String

-- | Blank URI
nullURI :: URI

-- | Turn a string containing a URI into a URI. Returns
--   Nothing if the string is not a valid URI; (an absolute URI with
--   optional fragment identifier).
--   
--   NOTE: this is different from the previous network.URI, whose
--   parseURI function works like parseURIReference in this
--   module.
parseURI :: String -> Maybe URI

-- | Parse a URI reference to a URI value. Returns Nothing if
--   the string is not a valid URI reference. (an absolute or relative URI
--   with optional fragment identifier).
parseURIReference :: String -> Maybe URI

-- | Parse a relative URI to a URI value. Returns Nothing if
--   the string is not a valid relative URI. (a relative URI with optional
--   fragment identifier).
parseRelativeReference :: String -> Maybe URI

-- | Parse an absolute URI to a URI value. Returns Nothing if
--   the string is not a valid absolute URI. (an absolute URI without a
--   fragment identifier).
parseAbsoluteURI :: String -> Maybe URI

-- | Turn a URI into a string.
--   
--   Uses a supplied function to map the userinfo part of the URI.
--   
--   The Show instance for URI uses a mapping that hides any password that
--   may be present in the URI. Use this function with argument id
--   to preserve the password in the formatted output.
uriToString :: (String -> String) -> URI -> ShowS
data URIError
URIParseError :: String -> String -> URIError
URIAppendError :: URI -> URI -> URIError
uriSchemeLens :: Lens' URI String
uriAuthorityLens :: Lens' URI (Maybe URIAuth)
uriPathLens :: Lens' URI String
uriQueryLens :: Lens' URI String
uriFragmentLens :: Lens' URI String

-- | A wrapper around a String containing a known parsable URI. Not
--   absolutely safe, because you could say read "URI' "bogus string"" ::
--   URI'. But enough to save me from myself.
newtype URI'
URI' :: String -> URI'
fromURI' :: URI' -> URI

-- | Using the bogus Show instance of URI here. If it ever gets fixed this
--   will stop working. Worth noting that show will obscure any password
--   info embedded in the URI, so that's nice.
toURI' :: URI -> URI'
readURI' :: String -> Maybe URI'
showURI :: URI -> String
parseURIReference' :: (HasURIError e, MonadError e m) => String -> m URI

-- | parseURI with MonadError
parseURI' :: (HasURIError e, MonadError e m) => String -> m URI
parseAbsoluteURI' :: (HasURIError e, MonadError e m) => String -> m URI
parseRelativeReference' :: (HasURIError e, MonadError e m) => String -> m URI
parseURIUnsafe :: String -> URI

-- | Conservative appending of absolute and relative URIs. There may be
--   other cases that can be implemented, lets see if they turn up.
appendURI :: MonadError URIError m => URI -> URI -> m URI

-- | Append a list of URI @@ λ> appendURIs (parseURI
--   "http://host.com") (parseURIRelative "/bar")
appendURIs :: (Foldable t, MonadError URIError m) => t URI -> m URI
parentURI :: URI -> URI
uriToString' :: URI -> String
class HasParseError e
fromParseError :: HasParseError e => ParseError -> e
class HasURIError e
fromURIError :: HasURIError e => URIError -> e
prop_print_parse :: URI -> Bool
prop_append_singleton :: URI -> Bool
instance GHC.Classes.Eq Debian.URI.URI'
instance GHC.Classes.Eq Debian.URI.URIError
instance Debian.URI.HasParseError Text.Parsec.Error.ParseError
instance Debian.URI.HasURIError Debian.URI.URIError
instance GHC.Classes.Ord Text.Parsec.Error.ParseError
instance GHC.Classes.Ord Debian.URI.URI'
instance GHC.Classes.Ord Debian.URI.URIError
instance GHC.Internal.Read.Read Debian.URI.URI'
instance GHC.Internal.Show.Show Debian.URI.URI'
instance GHC.Internal.Show.Show Debian.URI.URIError

-- | an interface for using the methods in varlibaptmethods
module Debian.Apt.Methods

-- | withMethod - run |methodPath| bracketed with openMethod/closeMethod.
--   |f| gets the open handle.
withMethodPath :: FilePath -> (MethodHandle -> IO a) -> IO a
withMethodURI :: URI -> (MethodHandle -> IO a) -> IO a

-- | whichMethodBinary - find the method executable associated with a URI
--   throws an exception on failure
whichMethodPath :: URI -> IO (Maybe FilePath)
openMethod :: FilePath -> IO MethodHandle
closeMethod :: MethodHandle -> IO ExitCode
recvStatus :: MethodHandle -> IO Status
sendCommand :: MethodHandle -> Command -> IO ()
getLastModified :: FilePath -> IO (Maybe UTCTime)
simpleFetch :: [ConfigItem] -> URI -> FilePath -> Maybe UTCTime -> IO Bool

-- | fetch a single item, show console output see also: getLastModified
fetch :: FetchCallbacks -> [ConfigItem] -> URI -> FilePath -> Maybe UTCTime -> IO Bool
data FetchCallbacks
FetchCallbacks :: (Message -> IO ()) -> (URI -> Message -> IO ()) -> (URI -> Maybe Integer -> Maybe UTCTime -> Maybe Integer -> IO ()) -> (URI -> Maybe Integer -> Maybe UTCTime -> Maybe Integer -> Maybe FilePath -> Hashes -> Bool -> IO ()) -> (URI -> Message -> IO ()) -> (Message -> IO ()) -> (Site -> IO (Maybe (User, Password))) -> (Media -> Drive -> IO ()) -> (String -> IO ()) -> FetchCallbacks
[logCB] :: FetchCallbacks -> Message -> IO ()
[statusCB] :: FetchCallbacks -> URI -> Message -> IO ()
[uriStartCB] :: FetchCallbacks -> URI -> Maybe Integer -> Maybe UTCTime -> Maybe Integer -> IO ()
[uriDoneCB] :: FetchCallbacks -> URI -> Maybe Integer -> Maybe UTCTime -> Maybe Integer -> Maybe FilePath -> Hashes -> Bool -> IO ()
[uriFailureCB] :: FetchCallbacks -> URI -> Message -> IO ()
[generalFailureCB] :: FetchCallbacks -> Message -> IO ()
[authorizationRequiredCB] :: FetchCallbacks -> Site -> IO (Maybe (User, Password))
[mediaFailureCB] :: FetchCallbacks -> Media -> Drive -> IO ()
[debugCB] :: FetchCallbacks -> String -> IO ()

-- | set of callbacks which do nothing. suitable for non-interactive usage.
--   In the case authorization is required, no credentials will be supplied
--   and the download should abort.
emptyFetchCallbacks :: FetchCallbacks
cliFetchCallbacks :: FetchCallbacks
data Command
URIAcquire :: URI -> FilePath -> Maybe UTCTime -> Command
Configuration :: [ConfigItem] -> Command
AuthorizationCredentials :: Site -> User -> Password -> Command
MediaChanged :: Media -> Maybe Bool -> Command
data Status
Capabilities :: String -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Status
[version] :: Status -> String
[singleInstance] :: Status -> Bool
[preScan] :: Status -> Bool
[pipeline] :: Status -> Bool
[sendConfig] :: Status -> Bool
[needsCleanup] :: Status -> Bool
[localOnly] :: Status -> Bool
LogMsg :: Message -> Status
Status :: URI -> Message -> Status
URIStart :: URI -> Maybe Integer -> Maybe UTCTime -> Maybe Integer -> Status
[uri] :: Status -> URI
[size] :: Status -> Maybe Integer
[lastModified] :: Status -> Maybe UTCTime
[resumePoint] :: Status -> Maybe Integer
URIDone :: URI -> Maybe Integer -> Maybe UTCTime -> Maybe Integer -> Maybe FilePath -> Hashes -> Bool -> Status
[uri] :: Status -> URI
[size] :: Status -> Maybe Integer
[lastModified] :: Status -> Maybe UTCTime
[resumePoint] :: Status -> Maybe Integer
[filename] :: Status -> Maybe FilePath
[hashes] :: Status -> Hashes
[imsHit] :: Status -> Bool
URIFailure :: URI -> Message -> Status
[uri] :: Status -> URI
[message] :: Status -> Message
GeneralFailure :: Message -> Status
AuthorizationRequired :: Site -> Status
MediaFailure :: Media -> Drive -> Status
type Message = String
type Site = String
type User = String
type Password = String
type Media = String
type Drive = String
type Header = (String, String)
type ConfigItem = (String, String)
instance GHC.Classes.Eq Debian.Apt.Methods.Command
instance GHC.Classes.Eq Debian.Apt.Methods.Hashes
instance GHC.Classes.Eq Debian.Apt.Methods.Status
instance GHC.Internal.Show.Show Debian.Apt.Methods.Command
instance GHC.Internal.Show.Show Debian.Apt.Methods.Hashes
instance GHC.Internal.Show.Show Debian.Apt.Methods.Status

-- | There are old index files that have funky characters like ø
--   that are not properly UTF8 encoded. As far as I can tell, these files
--   are otherwise plain ascii, so just naivelyinsert the character into
--   the output stream.
module Debian.UTF8
decode :: ByteString -> Text
readFile :: FilePath -> IO Text

module Debian.VendorURI
newtype VendorURI
VendorURI :: URI -> VendorURI
[_vendorURI] :: VendorURI -> URI
vendorURI :: Iso' VendorURI URI
parseVendorURI :: [Loc] -> String -> Maybe VendorURI
instance GHC.Classes.Eq Debian.VendorURI.VendorURI
instance GHC.Classes.Ord Debian.VendorURI.VendorURI
instance GHC.Internal.Show.Show Debian.VendorURI.VendorURI

module Debian.Sources
data SourceType
Deb :: SourceType
DebSrc :: SourceType
data SourceOption
SourceOption :: String -> SourceOp -> [String] -> SourceOption
data SourceOp
OpSet :: SourceOp
OpAdd :: SourceOp
OpDel :: SourceOp
data DebSource
DebSource :: SourceType -> [SourceOption] -> VendorURI -> Either String (Codename, [Section]) -> DebSource
[_sourceType] :: DebSource -> SourceType
[_sourceOptions] :: DebSource -> [SourceOption]
[_sourceUri] :: DebSource -> VendorURI
[_sourceDist] :: DebSource -> Either String (Codename, [Section])

-- | quoteWords - similar to words, but with special handling of
--   double-quotes and brackets.
--   
--   The handling double quotes and [] is supposed to match:
--   apt-0.6.44.2/apt-pkg/contrib/strutl.cc:ParseQuoteWord()
--   
--   The behaviour can be defined as:
--   
--   Break the string into space seperated words ignoring spaces that
--   appear between "" or []. Strip trailing and leading white space around
--   words. Strip out double quotes, but leave the square brackets intact.
quoteWords :: String -> [String]
stripLine :: String -> String
sourceLines :: String -> [String]

-- | parseSourceLine -- parses a source line the argument must be a
--   non-empty, valid source line with comments stripped see:
--   sourceLines
parseSourceLine :: [Loc] -> String -> DebSource
parseOptions :: String -> Either ParseError [SourceOption]
pOptions :: CharParser () [SourceOption]
pOption :: CharParser () SourceOption
pOp :: CharParser () SourceOp
parseSourceLine' :: [Loc] -> String -> Either String DebSource
parseSourcesList :: [Loc] -> String -> [DebSource]
testQuoteWords :: Test
testSourcesList :: Test
testSourcesList2 :: Test
validSourcesListStr :: String
validSourcesList :: [DebSource]
validSourcesListExpected :: String
_invalidSourcesListStr1 :: Text
testSourcesListParse :: Test
sourcesListTests :: Test
sourceDist :: Lens' DebSource (Either String (Codename, [Section]))
sourceOptions :: Lens' DebSource [SourceOption]
sourceType :: Lens' DebSource SourceType
sourceUri :: Lens' DebSource VendorURI
instance GHC.Classes.Eq Debian.Sources.DebSource
instance GHC.Classes.Eq Debian.Sources.SourceOp
instance GHC.Classes.Eq Debian.Sources.SourceOption
instance GHC.Classes.Eq Debian.Sources.SourceType
instance GHC.Classes.Ord Debian.Sources.DebSource
instance GHC.Classes.Ord Debian.Sources.SourceOp
instance GHC.Classes.Ord Debian.Sources.SourceOption
instance GHC.Classes.Ord Debian.Sources.SourceType
instance Distribution.Pretty.Pretty Debian.Sources.DebSource
instance Distribution.Pretty.Pretty (Debian.Pretty.PP [Debian.Sources.DebSource])
instance Distribution.Pretty.Pretty Debian.Sources.SourceOp
instance Distribution.Pretty.Pretty Debian.Sources.SourceOption
instance Distribution.Pretty.Pretty Debian.Sources.SourceType
instance GHC.Internal.Show.Show Debian.Sources.DebSource
instance GHC.Internal.Show.Show Debian.Sources.SourceOp
instance GHC.Internal.Show.Show Debian.Sources.SourceOption
instance GHC.Internal.Show.Show Debian.Sources.SourceType

-- | A module for parsing, comparing, and (eventually) modifying debian
--   version numbers.
--   http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version
module Debian.Version.Common
data DebianVersion
prettyDebianVersion :: DebianVersion -> Doc
class ParseDebianVersion a
parseDebianVersion :: ParseDebianVersion a => a -> Either ParseError DebianVersion

-- | Convert a string to a debian version number. May throw an exception if
--   the string is unparsable -- but I am not sure if that can currently
--   happen. Are there any invalid version strings? Perhaps ones with
--   underscore, or something?
parseDebianVersion' :: ParseDebianVersion string => string -> DebianVersion

-- | Split a DebianVersion into its three components: epoch, version,
--   revision. It is not safe to use the parsed version number for this
--   because you will lose information, such as leading zeros.
evr :: DebianVersion -> (Maybe Int, String, Maybe String)
epoch :: DebianVersion -> Maybe Int
version :: DebianVersion -> String
revision :: DebianVersion -> Maybe String
buildDebianVersion :: Maybe Int -> String -> Maybe String -> DebianVersion
parseDV :: CharParser () (Found Int, NonNumeric, Found NonNumeric)
instance GHC.Classes.Eq Debian.Version.Internal.DebianVersion
instance GHC.Classes.Eq Debian.Version.Internal.NonNumeric
instance GHC.Classes.Eq Debian.Version.Internal.Numeric
instance GHC.Classes.Ord Debian.Version.Internal.DebianVersion
instance GHC.Classes.Ord Debian.Version.Internal.NonNumeric
instance GHC.Classes.Ord Debian.Version.Internal.Numeric
instance Distribution.Pretty.Pretty (Debian.Pretty.PP Debian.Version.Internal.DebianVersion)
instance GHC.Internal.Show.Show Debian.Version.Internal.DebianVersion

module Debian.Version.ByteString
class ParseDebianVersion a
parseDebianVersion :: ParseDebianVersion a => a -> Either ParseError DebianVersion
instance Debian.Version.Common.ParseDebianVersion Data.ByteString.Internal.Type.ByteString

module Debian.Version.String
class ParseDebianVersion a
parseDebianVersion :: ParseDebianVersion a => a -> Either ParseError DebianVersion
instance Debian.Version.Common.ParseDebianVersion GHC.Internal.Base.String
instance GHC.Internal.Read.Read Debian.Version.Internal.DebianVersion

-- | A module for parsing, comparing, and (eventually) modifying debian
--   version numbers.
--   http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version
module Debian.Version
data DebianVersion
prettyDebianVersion :: DebianVersion -> Doc
parseDebianVersion :: ParseDebianVersion a => a -> Either ParseError DebianVersion

-- | Convert a string to a debian version number. May throw an exception if
--   the string is unparsable -- but I am not sure if that can currently
--   happen. Are there any invalid version strings? Perhaps ones with
--   underscore, or something?
parseDebianVersion' :: ParseDebianVersion string => string -> DebianVersion
epoch :: DebianVersion -> Maybe Int
version :: DebianVersion -> String
revision :: DebianVersion -> Maybe String
buildDebianVersion :: Maybe Int -> String -> Maybe String -> DebianVersion

-- | Split a DebianVersion into its three components: epoch, version,
--   revision. It is not safe to use the parsed version number for this
--   because you will lose information, such as leading zeros.
evr :: DebianVersion -> (Maybe Int, String, Maybe String)

module Debian.Relation.Common
type AndRelation = [OrRelation]
data ArchitectureReq
ArchOnly :: Set Arch -> ArchitectureReq
ArchExcept :: Set Arch -> ArchitectureReq
newtype BinPkgName
BinPkgName :: String -> BinPkgName
[unBinPkgName] :: BinPkgName -> String

-- | Check if a version number satisfies a version requirement.
checkVersionReq :: Maybe VersionReq -> Maybe DebianVersion -> Bool
type OrRelation = [Relation]
class ParseRelations a

-- | parseRelations parse a debian relation (i.e. the value of a
--   Depends field). Return a parsec error or a value of type
--   Relations
parseRelations :: ParseRelations a => a -> Either ParseError Relations
class Pretty PP a => PkgName a
pkgNameFromString :: PkgName a => String -> a
data Relation
RRel :: BinPkgName -> Maybe VersionReq -> Maybe ArchitectureReq -> [RestrictionList] -> Relation

-- | Deprecated: Switch to RRel
pattern Rel :: BinPkgName -> Maybe VersionReq -> Maybe ArchitectureReq -> Relation
type Relations = AndRelation
newtype SrcPkgName
SrcPkgName :: String -> SrcPkgName
[unSrcPkgName] :: SrcPkgName -> String
data VersionReq
SLT :: DebianVersion -> VersionReq
LTE :: DebianVersion -> VersionReq
EEQ :: DebianVersion -> VersionReq
GRE :: DebianVersion -> VersionReq
SGR :: DebianVersion -> VersionReq
type RestrictionList = OMap String Bool
instance GHC.Internal.Data.Data.Data Debian.Relation.Common.BinPkgName
instance GHC.Internal.Data.Data.Data Debian.Relation.Common.SrcPkgName
instance GHC.Classes.Eq Debian.Relation.Common.ArchitectureReq
instance GHC.Classes.Eq Debian.Relation.Common.BinPkgName
instance GHC.Classes.Eq Debian.Relation.Common.Relation
instance GHC.Classes.Eq Debian.Relation.Common.SrcPkgName
instance GHC.Classes.Eq Debian.Relation.Common.VersionReq
instance GHC.Classes.Ord Debian.Relation.Common.ArchitectureReq
instance GHC.Classes.Ord Debian.Relation.Common.BinPkgName
instance GHC.Classes.Ord Debian.Relation.Common.Relation
instance GHC.Classes.Ord Debian.Relation.Common.SrcPkgName
instance GHC.Classes.Ord Debian.Relation.Common.VersionReq
instance Debian.Relation.Common.PkgName Debian.Relation.Common.BinPkgName
instance Debian.Relation.Common.PkgName Debian.Relation.Common.SrcPkgName
instance Distribution.Pretty.Pretty (Debian.Pretty.PP Debian.Relation.Common.Relations)
instance Distribution.Pretty.Pretty (Debian.Pretty.PP Debian.Relation.Common.OrRelation)
instance Distribution.Pretty.Pretty (Debian.Pretty.PP Debian.Relation.Common.Relation)
instance Distribution.Pretty.Pretty (Debian.Pretty.PP Debian.Relation.Common.VersionReq)
instance Distribution.Pretty.Pretty (Debian.Pretty.PP Debian.Relation.Common.ArchitectureReq)
instance Distribution.Pretty.Pretty (Debian.Pretty.PP Debian.Relation.Common.BinPkgName)
instance Distribution.Pretty.Pretty (Debian.Pretty.PP Debian.Relation.Common.SrcPkgName)
instance GHC.Internal.Read.Read Debian.Relation.Common.ArchitectureReq
instance GHC.Internal.Read.Read Debian.Relation.Common.BinPkgName
instance GHC.Internal.Read.Read Debian.Relation.Common.Relation
instance GHC.Internal.Read.Read Debian.Relation.Common.SrcPkgName
instance GHC.Internal.Read.Read Debian.Relation.Common.VersionReq
instance GHC.Internal.Show.Show Debian.Relation.Common.ArchitectureReq
instance GHC.Internal.Show.Show Debian.Relation.Common.BinPkgName
instance GHC.Internal.Show.Show Debian.Relation.Common.Relation
instance GHC.Internal.Show.Show Debian.Relation.Common.SrcPkgName
instance GHC.Internal.Show.Show Debian.Relation.Common.VersionReq

-- | A module for working with debian relationships
--   http://www.debian.org/doc/debian-policy/ch-relationships.html
module Debian.Relation.String
type AndRelation = [OrRelation]
type OrRelation = [Relation]
type Relations = AndRelation
data Relation
RRel :: BinPkgName -> Maybe VersionReq -> Maybe ArchitectureReq -> [RestrictionList] -> Relation

-- | Deprecated: Switch to RRel
pattern Rel :: BinPkgName -> Maybe VersionReq -> Maybe ArchitectureReq -> Relation
data ArchitectureReq
ArchOnly :: Set Arch -> ArchitectureReq
ArchExcept :: Set Arch -> ArchitectureReq
data VersionReq
SLT :: DebianVersion -> VersionReq
LTE :: DebianVersion -> VersionReq
EEQ :: DebianVersion -> VersionReq
GRE :: DebianVersion -> VersionReq
SGR :: DebianVersion -> VersionReq

-- | Check if a version number satisfies a version requirement.
checkVersionReq :: Maybe VersionReq -> Maybe DebianVersion -> Bool
type RelParser a = CharParser () a
class ParseRelations a

-- | parseRelations parse a debian relation (i.e. the value of a
--   Depends field). Return a parsec error or a value of type
--   Relations
parseRelations :: ParseRelations a => a -> Either ParseError Relations
pRelations :: RelParser Relations
instance Debian.Relation.Common.ParseRelations GHC.Internal.Base.String

-- | A module for working with debian relationships
--   http://www.debian.org/doc/debian-policy/ch-relationships.html
module Debian.Relation.Text
type AndRelation = [OrRelation]
type OrRelation = [Relation]
type Relations = AndRelation
data Relation
RRel :: BinPkgName -> Maybe VersionReq -> Maybe ArchitectureReq -> [RestrictionList] -> Relation

-- | Deprecated: Switch to RRel
pattern Rel :: BinPkgName -> Maybe VersionReq -> Maybe ArchitectureReq -> Relation
data ArchitectureReq
ArchOnly :: Set Arch -> ArchitectureReq
ArchExcept :: Set Arch -> ArchitectureReq
data VersionReq
SLT :: DebianVersion -> VersionReq
LTE :: DebianVersion -> VersionReq
EEQ :: DebianVersion -> VersionReq
GRE :: DebianVersion -> VersionReq
SGR :: DebianVersion -> VersionReq

-- | Check if a version number satisfies a version requirement.
checkVersionReq :: Maybe VersionReq -> Maybe DebianVersion -> Bool
type RelParser a = CharParser () a
class ParseRelations a

-- | parseRelations parse a debian relation (i.e. the value of a
--   Depends field). Return a parsec error or a value of type
--   Relations
parseRelations :: ParseRelations a => a -> Either ParseError Relations
instance Debian.Relation.Common.ParseRelations Data.Text.Internal.Text

-- | A module for working with debian relationships
--   http://www.debian.org/doc/debian-policy/ch-relationships.html
module Debian.Relation.ByteString
type AndRelation = [OrRelation]
type OrRelation = [Relation]
type Relations = AndRelation
data Relation
RRel :: BinPkgName -> Maybe VersionReq -> Maybe ArchitectureReq -> [RestrictionList] -> Relation

-- | Deprecated: Switch to RRel
pattern Rel :: BinPkgName -> Maybe VersionReq -> Maybe ArchitectureReq -> Relation
data ArchitectureReq
ArchOnly :: Set Arch -> ArchitectureReq
ArchExcept :: Set Arch -> ArchitectureReq
data VersionReq
SLT :: DebianVersion -> VersionReq
LTE :: DebianVersion -> VersionReq
EEQ :: DebianVersion -> VersionReq
GRE :: DebianVersion -> VersionReq
SGR :: DebianVersion -> VersionReq

-- | Check if a version number satisfies a version requirement.
checkVersionReq :: Maybe VersionReq -> Maybe DebianVersion -> Bool
type RelParser a = CharParser () a
class ParseRelations a

-- | parseRelations parse a debian relation (i.e. the value of a
--   Depends field). Return a parsec error or a value of type
--   Relations
parseRelations :: ParseRelations a => a -> Either ParseError Relations
instance Debian.Relation.Common.ParseRelations Data.ByteString.Internal.Type.ByteString

-- | A module for working with debian relationships
--   http://www.debian.org/doc/debian-policy/ch-relationships.html
module Debian.Relation
class Pretty PP a => PkgName a
pkgNameFromString :: PkgName a => String -> a
newtype SrcPkgName
SrcPkgName :: String -> SrcPkgName
[unSrcPkgName] :: SrcPkgName -> String
newtype BinPkgName
BinPkgName :: String -> BinPkgName
[unBinPkgName] :: BinPkgName -> String
type Relations = AndRelation
type AndRelation = [OrRelation]
type OrRelation = [Relation]
data Relation
RRel :: BinPkgName -> Maybe VersionReq -> Maybe ArchitectureReq -> [RestrictionList] -> Relation

-- | Deprecated: Switch to RRel
pattern Rel :: BinPkgName -> Maybe VersionReq -> Maybe ArchitectureReq -> Relation
data ArchitectureReq
ArchOnly :: Set Arch -> ArchitectureReq
ArchExcept :: Set Arch -> ArchitectureReq
data Arch
Source :: Arch
All :: Arch
Binary :: ArchOS -> ArchCPU -> Arch
data ArchOS
ArchOS :: String -> ArchOS
ArchOSAny :: ArchOS
data ArchCPU
ArchCPU :: String -> ArchCPU
ArchCPUAny :: ArchCPU
data VersionReq
SLT :: DebianVersion -> VersionReq
LTE :: DebianVersion -> VersionReq
EEQ :: DebianVersion -> VersionReq
GRE :: DebianVersion -> VersionReq
SGR :: DebianVersion -> VersionReq
type RestrictionList = OMap String Bool

-- | Check if a version number satisfies a version requirement.
checkVersionReq :: Maybe VersionReq -> Maybe DebianVersion -> Bool
type RelParser a = CharParser () a
class ParseRelations a

-- | parseRelations parse a debian relation (i.e. the value of a
--   Depends field). Return a parsec error or a value of type
--   Relations
parseRelations :: ParseRelations a => a -> Either ParseError Relations

-- | Access to things that Debian policy says should be in a valid control
--   file. The pure functions will not throw ControlFileError if they are
--   operating on a DebianControl value returned by validateDebianControl.
--   However, they might if they are created using unsafeDebianControl.
module Debian.Control.Policy

-- | Opaque (constructor not exported) type to hold a validated Debian
--   Control File
data DebianControl

-- | Validate and return a control file in an opaque wrapper. May throw a
--   ControlFileError. Currently we only verify that it has a Source field
--   in the first paragraph and one or more subsequent paragraphs each with
--   a Package field, and no syntax errors in the build dependencies
--   (though they may be absent.)
validateDebianControl :: MonadCatch m => Control' Text -> m (Either ControlFileError DebianControl)
unsafeDebianControl :: Control' Text -> DebianControl
parseDebianControlFromFile :: FilePath -> IO (Either ControlFileError DebianControl)
parseDebianControl :: MonadCatch m => String -> Text -> m (Either ControlFileError DebianControl)

-- | Errors that control files might throw, with source file name and line
--   number generated by template haskell.
data ControlFileError
NoParagraphs :: [Loc] -> ControlFileError
[locs] :: ControlFileError -> [Loc]
NoBinaryParagraphs :: [Loc] -> String -> ControlFileError
[locs] :: ControlFileError -> [Loc]
[ctl] :: ControlFileError -> String
MissingField :: [Loc] -> String -> ControlFileError
[locs] :: ControlFileError -> [Loc]
[field] :: ControlFileError -> String
ParseRelationsError :: [Loc] -> ParseError -> ControlFileError
[locs] :: ControlFileError -> [Loc]
[parseError] :: ControlFileError -> ParseError
ParseControlError :: [Loc] -> ParseError -> ControlFileError
[locs] :: ControlFileError -> [Loc]
[parseError] :: ControlFileError -> ParseError
IOError :: [Loc] -> IOError -> ControlFileError
[locs] :: ControlFileError -> [Loc]
[ioError] :: ControlFileError -> IOError

-- | Class of things that contain a validated Debian control file.
class Show a => HasDebianControl a
debianControl :: HasDebianControl a => a -> DebianControl
debianSourceParagraph :: HasDebianControl a => a -> Paragraph' Text
debianBinaryParagraphs :: HasDebianControl a => a -> [Paragraph' Text]
debianPackageParagraphs :: HasDebianControl a => a -> (Paragraph' Text, [Paragraph' Text])
debianPackageNames :: HasDebianControl a => a -> (SrcPkgName, [BinPkgName])
debianSourcePackageName :: HasDebianControl a => a -> SrcPkgName
debianBinaryPackageNames :: HasDebianControl a => a -> [BinPkgName]

-- | This could access fields we haven't validated, so it can return an
--   error. Additionally, the field might be absent, in which case it
--   returns Nothing.
debianRelations :: HasDebianControl a => String -> a -> Either ControlFileError (Maybe Relations)
debianBuildDeps :: HasDebianControl a => a -> Maybe Relations
debianBuildDepsIndep :: HasDebianControl a => a -> Maybe Relations
instance GHC.Classes.Eq Debian.Control.Policy.ControlFileError
instance GHC.Internal.Exception.Type.Exception Debian.Control.Policy.ControlFileError
instance Debian.Control.Policy.HasControl (Debian.Control.Common.Control' Data.Text.Internal.Text)
instance Debian.Control.Policy.HasControl Debian.Control.Policy.DebianControl
instance Debian.Control.Policy.HasDebianControl Debian.Control.Policy.DebianControl
instance GHC.Internal.Show.Show Debian.Control.Policy.ControlFileError
instance GHC.Internal.Show.Show Debian.Control.Policy.DebianControl

-- | A module for working with Debian control files
--   http://www.debian.org/doc/debian-policy/ch-controlfields.html
module Debian.Control
newtype Control' a
Control :: [Paragraph' a] -> Control' a
[unControl] :: Control' a -> [Paragraph' a]
newtype Paragraph' a
Paragraph :: [Field' a] -> Paragraph' a

-- | NOTE: we do not strip the leading or trailing whitespace in the name
--   or value
data Field' a
Field :: (a, a) -> Field' a

-- | Lines beginning with #
Comment :: a -> Field' a
type Control = Control' String
type Paragraph = Paragraph' String
type Field = Field' String
type ControlParser a = CharParser () a
class ControlFunctions a

-- | parseControlFromFile filepath is a simple wrapper
--   function that parses filepath using pControl
parseControlFromFile :: ControlFunctions a => FilePath -> IO (Either ParseError (Control' a))

-- | parseControlFromHandle sourceName handle -
--   sourceName is only used for error reporting
parseControlFromHandle :: ControlFunctions a => String -> Handle -> IO (Either ParseError (Control' a))

-- | parseControlFromString sourceName text -
--   sourceName is only used for error reporting
parseControl :: ControlFunctions a => String -> a -> Either ParseError (Control' a)

-- | lookupP fieldName paragraph looks up a Field in
--   a Paragraph. N.B. trailing and leading whitespace is
--   not stripped.
lookupP :: ControlFunctions a => String -> Paragraph' a -> Maybe (Field' a)

-- | Strip the trailing and leading space and tab characters from a string.
--   Folded whitespace is not unfolded. This should probably be
--   moved to someplace more general purpose.
stripWS :: ControlFunctions a => a -> a

-- | Protect field value text so the parser doesn't split it into multiple
--   fields or paragraphs. This must modify all field text to enforce two
--   conditions: (1) All lines other than the initial one must begin with a
--   space or a tab, and (2) the trailing white space must not contain
--   newlines. This is called before pretty printing to prevent the parser
--   from misinterpreting field text as multiple fields or paragraphs.
protectFieldText :: ControlFunctions a => a -> a
asString :: ControlFunctions a => a -> String

-- | A parser for debian control file. This parser handles control files
--   that end without a newline as well as ones that have several blank
--   lines at the end. It is very liberal and does not attempt validate the
--   fields in any way. All trailing, leading, and folded whitespace is
--   preserved in the field values. See stripWS.
pControl :: ControlParser Control
mergeControls :: [Control' a] -> Control' a
fieldValue :: ControlFunctions a => String -> Paragraph' a -> Maybe a
removeField :: Eq a => a -> Paragraph' a -> Paragraph' a
prependFields :: [Field' a] -> Paragraph' a -> Paragraph' a
appendFields :: [Field' a] -> Paragraph' a -> Paragraph' a
renameField :: Eq a => a -> a -> Paragraph' a -> Paragraph' a
modifyField :: Eq a => a -> (a -> a) -> Paragraph' a -> Paragraph' a

-- | Move selected fields to the beginning of a paragraph.
raiseFields :: Eq a => (a -> Bool) -> Paragraph' a -> Paragraph' a
packParagraph :: Paragraph -> Paragraph
packField :: Field' String -> Field' Text
formatControl :: Control' Text -> [Text]
formatParagraph :: Paragraph' Text -> Text
formatField :: Field' Text -> Text

-- | Class of things that contain a validated Debian control file.
class Show a => HasDebianControl a
debianControl :: HasDebianControl a => a -> DebianControl

-- | Errors that control files might throw, with source file name and line
--   number generated by template haskell.
data ControlFileError
NoParagraphs :: [Loc] -> ControlFileError
[locs] :: ControlFileError -> [Loc]
NoBinaryParagraphs :: [Loc] -> String -> ControlFileError
[locs] :: ControlFileError -> [Loc]
[ctl] :: ControlFileError -> String
MissingField :: [Loc] -> String -> ControlFileError
[locs] :: ControlFileError -> [Loc]
[field] :: ControlFileError -> String
ParseRelationsError :: [Loc] -> ParseError -> ControlFileError
[locs] :: ControlFileError -> [Loc]
[parseError] :: ControlFileError -> ParseError
ParseControlError :: [Loc] -> ParseError -> ControlFileError
[locs] :: ControlFileError -> [Loc]
[parseError] :: ControlFileError -> ParseError
IOError :: [Loc] -> IOError -> ControlFileError
[locs] :: ControlFileError -> [Loc]
[ioError] :: ControlFileError -> IOError
parseDebianControlFromFile :: FilePath -> IO (Either ControlFileError DebianControl)

-- | Validate and return a control file in an opaque wrapper. May throw a
--   ControlFileError. Currently we only verify that it has a Source field
--   in the first paragraph and one or more subsequent paragraphs each with
--   a Package field, and no syntax errors in the build dependencies
--   (though they may be absent.)
validateDebianControl :: MonadCatch m => Control' Text -> m (Either ControlFileError DebianControl)
unsafeDebianControl :: Control' Text -> DebianControl
debianSourceParagraph :: HasDebianControl a => a -> Paragraph' Text
debianBinaryParagraphs :: HasDebianControl a => a -> [Paragraph' Text]
debianPackageParagraphs :: HasDebianControl a => a -> (Paragraph' Text, [Paragraph' Text])
debianPackageNames :: HasDebianControl a => a -> (SrcPkgName, [BinPkgName])
debianSourcePackageName :: HasDebianControl a => a -> SrcPkgName
debianBinaryPackageNames :: HasDebianControl a => a -> [BinPkgName]

-- | This could access fields we haven't validated, so it can return an
--   error. Additionally, the field might be absent, in which case it
--   returns Nothing.
debianRelations :: HasDebianControl a => String -> a -> Either ControlFileError (Maybe Relations)
debianBuildDeps :: HasDebianControl a => a -> Maybe Relations
debianBuildDepsIndep :: HasDebianControl a => a -> Maybe Relations

module Debian.Util.FakeChanges
fakeChanges :: [FilePath] -> IO (FilePath, String)
instance GHC.Internal.Data.Data.Data Debian.Util.FakeChanges.Error
instance GHC.Classes.Eq Debian.Util.FakeChanges.Error
instance GHC.Internal.Read.Read Debian.Util.FakeChanges.Error
instance GHC.Internal.Show.Show Debian.Util.FakeChanges.Error

-- | Figure out the dependency relation between debianized source
--   directories. The code to actually solve these dependency relations for
--   a particular set of binary packages is in Debian.Repo.Dependency.
module Debian.GenBuildDeps

-- | This type describes the build dependencies of a source package.
data DepInfo
DepInfo :: SrcPkgName -> Relations -> [BinPkgName] -> Set BinPkgName -> Set BinPkgName -> DepInfo

-- | source package name
[sourceName] :: DepInfo -> SrcPkgName

-- | dependency relations
[relations] :: DepInfo -> Relations

-- | binary dependency names (is this a function of relations?)
[binaryNames] :: DepInfo -> [BinPkgName]

-- | Set containing all binary package names mentioned in relations
[depSet] :: DepInfo -> Set BinPkgName

-- | Set containing binaryNames
[binSet] :: DepInfo -> Set BinPkgName

-- | source package name
sourceName' :: HasDebianControl control => control -> SrcPkgName

-- | dependency relations
relations' :: HasDebianControl control => control -> Relations

-- | binary dependency names (is this a function of relations?)
binaryNames' :: HasDebianControl control => control -> [BinPkgName]

-- | Return the dependency info for a source package with the given
--   dependency relaxation. |According to debian policy, only the first
--   paragraph in debian/control can be a source package
--   http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-sourcecontrolfiles
buildDependencies :: HasDebianControl control => control -> DepInfo

-- | Given a source package name and a binary package name, return False if
--   the binary package should be ignored hwen deciding whether to build
--   the source package. This is used to prevent build dependency cycles
--   from triggering unnecessary rebuilds. (This is a replacement for the
--   RelaxInfo type, which we temporarily rename OldRelaxInfo.)
type RelaxInfo = SrcPkgName -> BinPkgName -> Bool

-- | Remove any dependencies that are designated "relaxed" by relaxInfo.
relaxDeps :: RelaxInfo -> [DepInfo] -> [DepInfo]
data BuildableInfo a
BuildableInfo :: [ReadyTarget a] -> [a] -> BuildableInfo a
[readyTargets] :: BuildableInfo a -> [ReadyTarget a]
[allBlocked] :: BuildableInfo a -> [a]
CycleInfo :: [(a, a)] -> BuildableInfo a
[depPairs] :: BuildableInfo a -> [(a, a)]
data ReadyTarget a
ReadyTarget :: a -> [a] -> [a] -> ReadyTarget a

-- | Some target whose build dependencies are all satisfied
[ready] :: ReadyTarget a -> a

-- | The targets that are waiting for the ready target
[waiting] :: ReadyTarget a -> [a]

-- | The rest of the targets that need to be built
[other] :: ReadyTarget a -> [a]

-- | Given an ordering function representing the dependencies on a list of
--   packages, return a ReadyTarget triple: One ready package, the packages
--   that depend on the ready package directly or indirectly, and all the
--   other packages.
buildable :: (a -> DepInfo) -> [a] -> BuildableInfo a

-- | This is a nice start. It ignores circular build depends and takes a
--   pretty simplistic approach to or build depends. However, I
--   think this should work pretty nicely in practice.
compareSource :: DepInfo -> DepInfo -> Ordering

-- | Given a list of packages, sort them according to their apparant build
--   dependencies so that the first element doesn't depend on any of the
--   other packages.
orderSource :: (a -> a -> Ordering) -> [a] -> [a]

-- | Return the dependency info for a list of control files.
genDeps :: [FilePath] -> IO [DebianControl]

-- | Remove any packages which can't be built given that a package has
--   failed.
failPackage :: Eq a => (a -> a -> Ordering) -> a -> [a] -> ([a], [a])

-- | One example of how to tie the below functions together. In this case
--   fp is the path to a directory that contains a bunch of
--   checked out source packages. The code will automatically look for
--   debian/control. It returns a list with the packages in the order they
--   should be built.
getSourceOrder :: FilePath -> IO [SrcPkgName]
instance GHC.Classes.Eq Debian.GenBuildDeps.DepInfo
instance GHC.Internal.Show.Show Debian.GenBuildDeps.DepInfo
instance GHC.Internal.Show.Show Debian.GenBuildDeps.OldRelaxInfo

module Debian.Apt.Index

-- | update - similar to apt-get update
update :: Fetcher -> FilePath -> String -> [DebSource] -> IO [Maybe (FilePath, Compression)]

-- | function-type for a function that downloads a file The timestamp is
--   optional. If the local file is as new or newer than the remote copy,
--   the download may be skipped.
--   
--   A good choice might be a partially parameterized call to fetch
type Fetcher = URI -> FilePath -> Maybe UTCTime -> IO Bool
data CheckSums
CheckSums :: Maybe String -> Maybe String -> Maybe String -> CheckSums
[md5sum] :: CheckSums -> Maybe String
[sha1] :: CheckSums -> Maybe String
[sha256] :: CheckSums -> Maybe String

-- | Package indexes on the server are uncompressed or compressed with gzip
--   or bzip2. We do not know what will exist on the server until we
--   actually look. This type is used to mark the compression status of
--   what was actually found.
data Compression
BZ2 :: Compression
GZ :: Compression
Uncompressed :: Compression
type FileTuple = (CheckSums, Size, FilePath)
type Size = Integer

-- | Parse a possibly compressed index file.
controlFromIndex :: Compression -> FilePath -> ByteString -> Either ParseError (Control' Text)

-- | parse an index possibly compressed file
controlFromIndex' :: Compression -> FilePath -> IO (Either ParseError (Control' Text))

-- | find the Contents-* files. These are not listed in the Release file
findContentsFiles :: (FilePath -> Bool) -> FilePath -> IO [FilePath]
findIndexes :: FilePath -> String -> [FileTuple] -> IO [(FileTuple, Compression)]
indexesInRelease :: (FilePath -> Bool) -> Control' Text -> [(CheckSums, Integer, FilePath)]

-- | make a FileTuple for a file found on the local disk returns
--   Nothing if the file does not exist.
tupleFromFilePath :: FilePath -> FilePath -> IO (Maybe FileTuple)
instance GHC.Internal.Enum.Bounded Debian.Apt.Index.Compression
instance GHC.Internal.Enum.Enum Debian.Apt.Index.Compression
instance GHC.Classes.Eq Debian.Apt.Index.CheckSums
instance GHC.Classes.Eq Debian.Apt.Index.Compression
instance GHC.Classes.Ord Debian.Apt.Index.Compression
instance GHC.Internal.Read.Read Debian.Apt.Index.CheckSums
instance GHC.Internal.Read.Read Debian.Apt.Index.Compression
instance GHC.Internal.Show.Show Debian.Apt.Index.CheckSums
instance GHC.Internal.Show.Show Debian.Apt.Index.Compression

-- | Changelog and changes file support.
module Debian.Changes

-- | A file generated by dpkg-buildpackage describing the result of a
--   package build
data ChangesFile
Changes :: FilePath -> String -> DebianVersion -> Codename -> Arch -> Paragraph' Text -> ChangeLogEntry -> [ChangedFileSpec] -> ChangesFile

-- | The full pathname of the directory holding the .changes file.
[changeDir] :: ChangesFile -> FilePath

-- | The package name parsed from the .changes file name
[changePackage] :: ChangesFile -> String

-- | The version number parsed from the .changes file name
[changeVersion] :: ChangesFile -> DebianVersion

-- | The Distribution field of the .changes file
[changeRelease] :: ChangesFile -> Codename

-- | The architecture parsed from the .changes file name
[changeArch] :: ChangesFile -> Arch

-- | The contents of the .changes file
[changeInfo] :: ChangesFile -> Paragraph' Text

-- | The value of the Changes field of the .changes file
[changeEntry] :: ChangesFile -> ChangeLogEntry

-- | The parsed value of the Files attribute
[changeFiles] :: ChangesFile -> [ChangedFileSpec]

-- | An entry in the list of files generated by the build.
data ChangedFileSpec
ChangedFileSpec :: String -> String -> String -> FileOffset -> SubSection -> String -> FilePath -> ChangedFileSpec
[changedFileMD5sum] :: ChangedFileSpec -> String
[changedFileSHA1sum] :: ChangedFileSpec -> String
[changedFileSHA256sum] :: ChangedFileSpec -> String
[changedFileSize] :: ChangedFileSpec -> FileOffset
[changedFileSection] :: ChangedFileSpec -> SubSection
[changedFilePriority] :: ChangedFileSpec -> String
[changedFileName] :: ChangedFileSpec -> FilePath
changesFileName :: ChangesFile -> String
newtype ChangeLog
ChangeLog :: [ChangeLogEntry] -> ChangeLog

-- | A changelog is a series of ChangeLogEntries
data ChangeLogEntry
Entry :: String -> DebianVersion -> [Codename] -> String -> String -> String -> String -> ChangeLogEntry
[logPackage] :: ChangeLogEntry -> String
[logVersion] :: ChangeLogEntry -> DebianVersion
[logDists] :: ChangeLogEntry -> [Codename]
[logUrgency] :: ChangeLogEntry -> String
[logComments] :: ChangeLogEntry -> String
[logWho] :: ChangeLogEntry -> String
[logDate] :: ChangeLogEntry -> String

-- | The parser here never returns this
WhiteSpace :: String -> ChangeLogEntry

-- | Parse the entries of a debian changelog and verify they are all valid.
parseChangeLog :: String -> Either [[String]] ChangeLog

-- | Parse a Debian Changelog and return a lazy list of entries
parseEntries :: String -> [Either [String] ChangeLogEntry]

-- | Parse a single changelog entry, returning the entry and the remaining
--   text.
parseEntry :: String -> Either [String] (ChangeLogEntry, String)

-- | Parse the changelog information that shows up in the .changes file,
--   i.e. a changelog entry with no signature.
parseChanges :: Text -> Maybe ChangeLogEntry
instance GHC.Classes.Eq Debian.Changes.ChangeLog
instance GHC.Classes.Eq Debian.Changes.ChangeLogEntry
instance GHC.Classes.Eq Debian.Changes.ChangedFileSpec
instance GHC.Classes.Eq Debian.Changes.ChangesFile
instance Distribution.Pretty.Pretty (Debian.Pretty.PP Debian.Changes.ChangeLog)
instance Distribution.Pretty.Pretty (Debian.Pretty.PP Debian.Changes.ChangesFile)
instance Distribution.Pretty.Pretty (Debian.Pretty.PP Debian.Changes.ChangeLogEntry)
instance Distribution.Pretty.Pretty (Debian.Pretty.PP [Debian.Changes.ChangeLogEntry])
instance Distribution.Pretty.Pretty (Debian.Pretty.PP Debian.Changes.ChangedFileSpec)
instance GHC.Internal.Read.Read Debian.Changes.ChangeLog
instance GHC.Internal.Read.Read Debian.Changes.ChangeLogEntry
instance GHC.Internal.Read.Read Debian.Changes.ChangedFileSpec
instance GHC.Internal.Read.Read Debian.Changes.ChangesFile
instance GHC.Internal.Show.Show Debian.Changes.ChangeLog
instance GHC.Internal.Show.Show Debian.Changes.ChangeLogEntry
instance GHC.Internal.Show.Show Debian.Changes.ChangedFileSpec
instance GHC.Internal.Show.Show Debian.Changes.ChangesFile

-- | Functions for dealing with source and binary packages in an
--   abstract-way
module Debian.Apt.Package
type PackageNameMap a = Map BinPkgName [a]

-- | packageNameMap creates a map from a package name to all the
--   versions of that package NOTE: Provides are not included in the map
--   NOTE: the sort order is random -- this is perhaps a bug see also:
--   addProvides
packageNameMap :: (a -> BinPkgName) -> [a] -> PackageNameMap a

-- | addProvides finds packages that Provide other packages and adds
--   them to the PackageNameMap. They will be adde to the end of the list,
--   so that real packages have 'higher priority' than virtual packages.
--   NOTE: Does not check for duplication or multiple use
addProvides :: (p -> [BinPkgName]) -> [p] -> PackageNameMap p -> PackageNameMap p

-- | findProvides
findProvides :: (p -> [BinPkgName]) -> [p] -> [(BinPkgName, p)]

-- | lookupPackageByRel returns all the packages that satisfy the
--   specified relation TODO: Add architecture check
lookupPackageByRel :: PackageNameMap a -> (a -> (BinPkgName, DebianVersion)) -> Relation -> [a]

module Debian.Apt.Dependencies
data Status
Remaining :: AndRelation -> Status
MissingDep :: Relation -> Status
Complete :: Status
type State a = (Status, [a])
complete :: State a -> Bool
data CSP a
CSP :: PackageNameMap a -> Relations -> (a -> Relations) -> (a -> Relations) -> (a -> (BinPkgName, DebianVersion)) -> CSP a
[pnm] :: CSP a -> PackageNameMap a
[relations] :: CSP a -> Relations
[depFunction] :: CSP a -> a -> Relations
[conflicts] :: CSP a -> a -> Relations
[packageVersion] :: CSP a -> a -> (BinPkgName, DebianVersion)

-- | TODO addProvides -- see DQL.Exec
controlCSP :: Control -> Relations -> (Paragraph -> Relations) -> CSP Paragraph
testCSP :: FilePath -> (Paragraph -> Relations) -> String -> (CSP Paragraph -> IO a) -> IO a
depF :: Paragraph -> Relations
test :: FilePath -> String -> Labeler Paragraph -> IO ()
packageVersionParagraph :: Paragraph -> (BinPkgName, DebianVersion)
conflict :: CSP p -> p -> p -> Bool

-- | JAS: deal with Provides (can a package provide more than one
--   package?)
conflict' :: (BinPkgName, DebianVersion) -> Relation -> Bool
mkTree :: a -> [Tree a] -> Tree a
label :: Tree a -> a
initTree :: (a -> [a]) -> a -> Tree a
mapTree :: (a -> b) -> Tree a -> Tree b
foldTree :: (a -> [b] -> b) -> Tree a -> b
zipTreesWith :: (a -> b -> c) -> Tree a -> Tree b -> Tree c
prune :: (a -> Bool) -> Tree a -> Tree a
leaves :: Tree a -> [a]
inhTree :: (b -> a -> b) -> b -> Tree a -> Tree b
distrTree :: (a -> [b]) -> b -> Tree a -> Tree b
mkSearchTree :: CSP a -> Tree (State a)

-- | earliestInconsistency does what it sounds like the 'reverse as' is
--   because the vars are order high to low, but we want to find the lowest
--   numbered (aka, eariest) inconsistency ??
earliestInconsistency :: CSP a -> State a -> Maybe ((BinPkgName, DebianVersion), (BinPkgName, DebianVersion))

-- | conflicting packages and relations that require non-existant packages
type ConflictSet = ([(BinPkgName, DebianVersion)], [Relation])
isConflict :: ConflictSet -> Bool
solutions :: Tree (State a, ConflictSet) -> [State a]
type Labeler a = CSP a -> Tree State a -> Tree (State a, ConflictSet)
search :: Labeler a -> CSP a -> [State a]
bt :: Labeler a

-- | bj - backjumping labeler
--   
--   If the node already has a conflict set, then leave it alone.
--   
--   Otherwise, the conflictset for the node is the combination of the
--   conflict sets of its direct children.
bj :: CSP p -> Tree (State p, ConflictSet) -> Tree (State p, ConflictSet)
unionCS :: [ConflictSet] -> ConflictSet
combine :: CSP p -> [(State p, ConflictSet)] -> [ConflictSet] -> ConflictSet
instance GHC.Classes.Eq Debian.Apt.Dependencies.Status

module Debian.Version.Text
class ParseDebianVersion a
parseDebianVersion :: ParseDebianVersion a => a -> Either ParseError DebianVersion
instance Debian.Version.Common.ParseDebianVersion Data.Text.Internal.Text
