CodeGenMonad: add Functor instance
[harpy.git] / Harpy / Call.hs
1 {-# OPTIONS -cpp #-}
2
3 --------------------------------------------------------------------------
4 -- |
5 -- Module      :  Harpy.Call
6 -- Copyright   :  (c) 2006-2007 Martin Grabmueller and Dirk Kleeblatt
7 -- License     :  GPL
8 -- 
9 -- Maintainer  :  {magr,klee}@cs.tu-berlin.de
10 -- Stability   :  provisional
11 -- Portability :  non-portable
12 --
13 -- Predefined call stubs for run-time generated code.
14 --------------------------------------------------------------------------
15
16 module Harpy.Call where
17
18 import Harpy.CodeGenMonad
19
20 import Data.Word
21 import Foreign.Ptr
22
23 #ifndef __HADDOCK__
24
25 $(callDecl "callAsVoid" [t|()|])
26 -- $(callDecl "callAsWord32ToWord32" [t|Word32 -> Word32|])
27 -- $(callDecl "callAs7PtrToVoid" [t|forall a b c d e f g . Ptr a -> Ptr b -> Ptr c -> Ptr d -> Ptr e -> Ptr f -> Ptr g -> () |])
28
29 #else
30
31 callAsVoid :: CodeGen e s ()
32 callAsWord32ToWord32 :: Word32 -> CodeGen e s Word32
33 callAs7PtrToVoid :: forall a b c d e f g e' s'. Ptr a -> Ptr b -> Ptr c -> Ptr d -> Ptr e -> Ptr f -> Ptr g -> CodeGen e' s' ()
34
35 #endif