Magic.Types

magic-1.1: Interface to C file/magic library

Copyright | Copyright (C) 2005 John Goerzen
License | BSD
Maintainer | John Goerzen,
Safe Haskell | Safe
Language | Haskell98

Magic.Types

Description

Maintainer : jgoerzen@complete.org Stability : provisional Portability: portable

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

Enum MagicFlag |
Eq MagicFlag |
Ord MagicFlag |
Show MagicFlag |