    {-# LINE 1 "Magic/Data.hsc" #-}
    -- AUTO-GENERATED FILE, DO NOT EDIT.  GENERATED BY utils/genconsts.hs
    {- |
       Module     : Magic.Data
       Copyright  : Copyright (C) 2005 John Goerzen
       License    : BSD

       Maintainer : John Goerzen,
       Maintainer : jgoerzen\@complete.org
       Stability  : provisional
       Portability: portable

    Haskell types for libmagic constants

    Written by John Goerzen, jgoerzen\@complete.org
    -}

    module Magic.Data (module Magic.Data) where

    data MagicFlag =
       MagicNone
     | MagicDebug
     | MagicSymlink
     | MagicCompress
     | MagicDevices
     | MagicMimeType
     | MagicMimeEncoding
     | MagicMime
     | MagicContinue
     | MagicCheck
     | MagicPreserveAtime
     | MagicRaw
     | MagicError
     | UnknownMagicFlag Int

     deriving (Int -> MagicFlag -> ShowS
    [MagicFlag] -> ShowS
    MagicFlag -> String
    (Int -> MagicFlag -> ShowS)
    -> (MagicFlag -> String)
    -> ([MagicFlag] -> ShowS)
    -> Show MagicFlag
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> MagicFlag -> ShowS
    showsPrec :: Int -> MagicFlag -> ShowS
    $cshow :: MagicFlag -> String
    show :: MagicFlag -> String
    $cshowList :: [MagicFlag] -> ShowS
    showList :: [MagicFlag] -> ShowS
    Show)

    instance Enum MagicFlag where
     toEnum :: Int -> MagicFlag
    toEnum (Int
    0) = MagicFlag
    MagicNone
    {-# LINE 42 "Magic/Data.hsc" #-}
     toEnum (1) = MagicDebug
    {-# LINE 43 "Magic/Data.hsc" #-}
     toEnum (2) = MagicSymlink
    {-# LINE 44 "Magic/Data.hsc" #-}
     toEnum (4) = MagicCompress
    {-# LINE 45 "Magic/Data.hsc" #-}
     toEnum (8) = MagicDevices
    {-# LINE 46 "Magic/Data.hsc" #-}
     toEnum (16) = MagicMimeType
    {-# LINE 47 "Magic/Data.hsc" #-}
     toEnum (1024) = MagicMimeEncoding
    {-# LINE 48 "Magic/Data.hsc" #-}
     toEnum (1040) = MagicMime
    {-# LINE 49 "Magic/Data.hsc" #-}
     toEnum (32) = MagicContinue
    {-# LINE 50 "Magic/Data.hsc" #-}
     toEnum (64) = MagicCheck
    {-# LINE 51 "Magic/Data.hsc" #-}
     toEnum (128) = MagicPreserveAtime
    {-# LINE 52 "Magic/Data.hsc" #-}
     toEnum (256) = MagicRaw
    {-# LINE 53 "Magic/Data.hsc" #-}
     toEnum (512) = MagicError
    {-# LINE 54 "Magic/Data.hsc" #-}
     toEnum x = UnknownMagicFlag x

     fromEnum :: MagicFlag -> Int
    fromEnum MagicFlag
    MagicNone = (Int
    0)
    {-# LINE 57 "Magic/Data.hsc" #-}
     fromEnum MagicDebug = (1)
    {-# LINE 58 "Magic/Data.hsc" #-}
     fromEnum MagicSymlink = (2)
    {-# LINE 59 "Magic/Data.hsc" #-}
     fromEnum MagicCompress = (4)
    {-# LINE 60 "Magic/Data.hsc" #-}
     fromEnum MagicDevices = (8)
    {-# LINE 61 "Magic/Data.hsc" #-}
     fromEnum MagicMimeType = (16)
    {-# LINE 62 "Magic/Data.hsc" #-}
     fromEnum MagicMimeEncoding = (1024)
    {-# LINE 63 "Magic/Data.hsc" #-}
     fromEnum MagicMime = (1040)
    {-# LINE 64 "Magic/Data.hsc" #-}
     fromEnum MagicContinue = (32)
    {-# LINE 65 "Magic/Data.hsc" #-}
     fromEnum MagicCheck = (64)
    {-# LINE 66 "Magic/Data.hsc" #-}
     fromEnum MagicPreserveAtime = (128)
    {-# LINE 67 "Magic/Data.hsc" #-}
     fromEnum MagicRaw = (256)
    {-# LINE 68 "Magic/Data.hsc" #-}
     fromEnum MagicError = (512)
    {-# LINE 69 "Magic/Data.hsc" #-}
     fromEnum (UnknownMagicFlag x) = x

    instance Ord MagicFlag where
     compare :: MagicFlag -> MagicFlag -> Ordering
    compare MagicFlag
    x MagicFlag
    y = Int -> Int -> Ordering
    forall a. Ord a => a -> a -> Ordering
    compare (MagicFlag -> Int
    forall a. Enum a => a -> Int
    fromEnum MagicFlag
    x) (MagicFlag -> Int
    forall a. Enum a => a -> Int
    fromEnum MagicFlag
    y)

    instance Eq MagicFlag where
     MagicFlag
    x == :: MagicFlag -> MagicFlag -> Bool
    == MagicFlag
    y = (MagicFlag -> Int
    forall a. Enum a => a -> Int
    fromEnum MagicFlag
    x) Int -> Int -> Bool
    forall a. Eq a => a -> a -> Bool
    == (MagicFlag -> Int
    forall a. Enum a => a -> Int
    fromEnum MagicFlag
    y)