File: Types.hsc

package info (click to toggle)
magic-haskell 1.1-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 88 kB
  • sloc: haskell: 14; makefile: 2
file content (42 lines) | stat: -rw-r--r-- 922 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{-  -*- Mode: haskell; -*-
Haskell magic Interface
Copyright (C) 2005 John Goerzen <jgoerzen@complete.org>

This code is under a 3-clause BSD license; see COPYING for details.
-}

{- |
   Module     : Magic.Types
   Copyright  : Copyright (C) 2005 John Goerzen
   License    : BSD

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

Types for magic programs.

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

module Magic.Types(Magic,
                   MagicFlag(..))
where
import Foreign.Ptr
import Data.Word
import Data.Int
import Foreign.C.Types
import Foreign.ForeignPtr
import Magic.Data
import Magic.TypesLL

#include <magic.h>

{- | 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.
-}
type Magic = ForeignPtr CMagic