magic-1.1: Interface to C file/magic library

Copyright | Copyright (C) 2005 John Goerzen
License | BSD
Maintainer | John Goerzen,
Stability | provisional
Portability | portable
Safe Haskell | Safe-Inferred
Language | Haskell98

Magic.Types

Description

Types for magic programs.

Written by John Goerzen, jgoerzen@complete.org

Synopsis

- type Magic = ForeignPtr CMagic
- data MagicFlag
  - = MagicNone
  - | MagicDebug
  - | MagicSymlink
  - | MagicCompress
  - | MagicDevices
  - | MagicMimeType
  - | MagicMimeEncoding
  - | MagicMime
  - | MagicContinue
  - | MagicCheck
  - | MagicPreserveAtime
  - | MagicRaw
  - | MagicError
  - | UnknownMagicFlag Int

# Documentation

type Magic = ForeignPtr CMagic Source #

Main Magic object type.

Magic objects are automatically closed (and memory freed) when they are garbage-collected by Haskell. There is no need to explicitly close them.

data MagicFlag Source #

Constructors

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

#### Instances

Instances details

Enum MagicFlag Source # |

Instance details

Defined in Magic.Data

Methods

succ :: MagicFlag -> MagicFlag Source #

pred :: MagicFlag -> MagicFlag Source #

toEnum :: Int -> MagicFlag Source #

fromEnum :: MagicFlag -> Int Source #

enumFrom :: MagicFlag -> [MagicFlag] Source #

enumFromThen :: MagicFlag -> MagicFlag -> [MagicFlag] Source #

enumFromTo :: MagicFlag -> MagicFlag -> [MagicFlag] Source #

enumFromThenTo :: MagicFlag -> MagicFlag -> MagicFlag -> [MagicFlag] Source #

Show MagicFlag Source # |
Instance details Defined in Magic.Data Methods showsPrec :: Int -> MagicFlag -> ShowS Source # show :: MagicFlag -> String Source # showList :: [MagicFlag] -> ShowS Source #
Eq MagicFlag Source # |
Instance details Defined in Magic.Data Methods (==) :: MagicFlag -> MagicFlag -> Bool Source # (/=) :: MagicFlag -> MagicFlag -> Bool Source #
Ord MagicFlag Source # |
Instance details Defined in Magic.Data Methods compare :: MagicFlag -> MagicFlag -> Ordering Source # (<) :: MagicFlag -> MagicFlag -> Bool Source # (<=) :: MagicFlag -> MagicFlag -> Bool Source # (>) :: MagicFlag -> MagicFlag -> Bool Source # (>=) :: MagicFlag -> MagicFlag -> Bool Source # max :: MagicFlag -> MagicFlag -> MagicFlag Source # min :: MagicFlag -> MagicFlag -> MagicFlag Source #