summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen/should_compile/cg007.hs
blob: 5ef739bd470e5cbcc2b6fa963be42e56c27d3aa1 (plain)
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
{-# LANGUAGE ForeignFunctionInterface #-}
module ShouldCompile where

import Foreign.C.Types

{-
During 6.11, this was failing like this:

In file included from /ghc/includes/Stg.h:207,

                 from /tmp/ghc2904_0/ghc2904_0.hc:3:0:
/tmp/ghc2904_0/ghc2904_0.hc: In function `swM_ret':

/tmp/ghc2904_0/ghc2904_0.hc:22:0:
     error: `gamma' undeclared (first use in this function)

/tmp/ghc2904_0/ghc2904_0.hc:22:0:
     error: (Each undeclared identifier is reported only once

/tmp/ghc2904_0/ghc2904_0.hc:22:0:
     error: for each function it appears in.)
-}

foreign import ccall unsafe "math.h gamma"
    gamma :: CDouble -> CDouble