6f7207f979639c7127ef024549bafced6a48698d
[ghc-hetmet.git] / ghc / tests / ccall / should_fail / cc004.hs
1 -- !!! cc004 -- ccall with synonyms, polymorphic type variables and user type variables.
2 module Test where
3
4 -- Since I messed up the handling of polymorphism originally, I'll
5 -- explicitly test code with UserSysTyVar (ie an explicit polymorphic
6 -- signature)
7
8 foo = _ccall_ f `thenADR` \ a -> return (a + 1)
9  where 
10    thenADR :: IO a -> (a -> IO b) -> IO b
11    thenADR = (>>=)
12
13 -- and with a PolySysTyVar (ie no explicit signature)
14
15 bar = _ccall_ f `thenADR` \ a -> return (a + 1)
16  where 
17    -- thenADR :: IO a -> (a -> IO b) -> IO b
18    thenADR = (>>=)
19
20 -- and with a type synonym
21
22 type INT = Int
23 barfu :: IO INT
24 barfu = _ccall_ b