    -- GENERATED by C->Haskell Compiler, version 0.16.4 Crystal Seed, 24 Jan 2009 (Haskell)
    -- Edit the ORIGNAL .chs file instead!

    {-# LINE 1 "./Debian/Dpkg/Enums.chs" #-}{-
     Enums.hs: Haskell bindings to libdpkg
       Copyright (C) 2011 Clint Adams

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 3 of the License, or
     (at your option) any later version.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
    -}

    {-# LANGUAGE ForeignFunctionInterface #-}
    {-# LANGUAGE TypeSynonymInstances #-}

    {-# LINE 27 "./Debian/Dpkg/Enums.chs" #-}

    module Debian.Dpkg.Enums (
        PkgWant(..)
      , PkgEflag(..)
      , PkgStatus(..)
      , PkgPriority(..)
    ) where

    import Foreign.C.Types
    import Foreign.C.String
    import Foreign.Ptr
    import Foreign.Storable

    data PkgWant = Want_unknown
                 | Want_install
                 | Want_hold
                 | Want_deinstall
                 | Want_purge
                 | Want_sentinel
                 deriving (Enum,Eq,Show)

    {-# LINE 41 "./Debian/Dpkg/Enums.chs" #-}
    data PkgEflag = Eflag_ok
                  | Eflag_reinstreq
                  deriving (Eq,Show)
    instance Enum PkgEflag where
      fromEnum Eflag_ok = 0
      fromEnum Eflag_reinstreq = 1

      toEnum 0 = Eflag_ok
      toEnum 1 = Eflag_reinstreq
      toEnum unmatched = error ("PkgEflag.toEnum: Cannot match " ++ show unmatched)

    {-# LINE 42 "./Debian/Dpkg/Enums.chs" #-}
    data PkgStatus = Stat_notinstalled
                   | Stat_configfiles
                   | Stat_halfinstalled
                   | Stat_unpacked
                   | Stat_halfconfigured
                   | Stat_triggersawaited
                   | Stat_triggerspending
                   | Stat_installed
                   deriving (Enum,Eq,Show)

    {-# LINE 43 "./Debian/Dpkg/Enums.chs" #-}
    data PkgPriority = Pri_required
                     | Pri_important
                     | Pri_standard
                     | Pri_optional
                     | Pri_extra
                     | Pri_other
                     | Pri_unknown
                     | Pri_unset
                     deriving (Eq,Show)
    instance Enum PkgPriority where
      fromEnum Pri_required = 0
      fromEnum Pri_important = 1
      fromEnum Pri_standard = 2
      fromEnum Pri_optional = 3
      fromEnum Pri_extra = 4
      fromEnum Pri_other = 5
      fromEnum Pri_unknown = 6
      fromEnum Pri_unset = (-1)

      toEnum 0 = Pri_required
      toEnum 1 = Pri_important
      toEnum 2 = Pri_standard
      toEnum 3 = Pri_optional
      toEnum 4 = Pri_extra
      toEnum 5 = Pri_other
      toEnum 6 = Pri_unknown
      toEnum (-1) = Pri_unset
      toEnum unmatched = error ("PkgPriority.toEnum: Cannot match " ++ show unmatched)

    {-# LINE 44 "./Debian/Dpkg/Enums.chs" #-}

    data DpkgMsgType = DPKG_MSG_NONE
                     | DPKG_MSG_WARN
                     | DPKG_MSG_ERROR
                     deriving (Enum,Eq,Show)

    {-# LINE 46 "./Debian/Dpkg/Enums.chs" #-}