Magic.Types

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 #

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 #

Constructors

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

#### Instances

Instances details

Enum MagicFlag # |
Instance details Defined in Magic.Data Methods succ :: MagicFlag -> MagicFlag # pred :: MagicFlag -> MagicFlag # toEnum :: Int -> MagicFlag # fromEnum :: MagicFlag -> Int # enumFrom :: MagicFlag -> [MagicFlag] # enumFromThen :: MagicFlag -> MagicFlag -> [MagicFlag] # enumFromTo :: MagicFlag -> MagicFlag -> [MagicFlag] # enumFromThenTo :: MagicFlag -> MagicFlag -> MagicFlag -> [MagicFlag] #
Show MagicFlag # |
Instance details Defined in Magic.Data Methods showsPrec :: Int -> MagicFlag -> ShowS # show :: MagicFlag -> String # showList :: [MagicFlag] -> ShowS #
Eq MagicFlag # |
Instance details Defined in Magic.Data Methods (==) :: MagicFlag -> MagicFlag -> Bool # (/=) :: MagicFlag -> MagicFlag -> Bool #
Ord MagicFlag # |
Instance details Defined in Magic.Data Methods compare :: MagicFlag -> MagicFlag -> Ordering # (<) :: MagicFlag -> MagicFlag -> Bool # (<=) :: MagicFlag -> MagicFlag -> Bool # (>) :: MagicFlag -> MagicFlag -> Bool # (>=) :: MagicFlag -> MagicFlag -> Bool # max :: MagicFlag -> MagicFlag -> MagicFlag # min :: MagicFlag -> MagicFlag -> MagicFlag #