Commit 8560d9cd authored by simonmar's avatar simonmar
Browse files

[project @ 2002-03-18 13:56:04 by simonmar]

update tests
parent 0f3c05f0
./cc001.hs:5:
cc001.hs:5:
Ambiguous type variable(s) `t'
in the constraint `PrelGHC.CCallable t'
arising from an argument in the _ccall_ to `foo', namely `(undefined ())' at ./cc001.hs:5
in the constraint `GHC.Prim.CCallable t'
arising from an argument in the _ccall_ to `foo', namely `(undefined ())' at cc001.hs:5
In the definition of `f': _ccall_ foo (undefined ())
......@@ -6,7 +6,7 @@ import Foreign
-- Test returning results
a :: IO ForeignObj
a :: IO (ForeignPtr a)
a = _ccall_ a
b :: IO (StablePtr Double)
......@@ -14,7 +14,7 @@ b = _ccall_ b
-- Test taking arguments
c :: ForeignObj -> IO Int
c :: ForeignPtr a -> IO Int
c x = _ccall_ c x
d :: StablePtr Int -> IO Int
......
cc002.hs:10:
No instance for (PrelGHC.CReturnable ForeignObj)
Could not deduce (GHC.Prim.CReturnable (ForeignPtr a))
from the context ()
Probable fix:
Add (GHC.Prim.CReturnable (ForeignPtr a))
to the type signature(s) for `a'
Or add an instance declaration for (GHC.Prim.CReturnable (ForeignPtr
a))
arising from the result of the _ccall_ to `a' at cc002.hs:10
In the definition of `a': _ccall_ a
./cc004.hs:8:
cc004.hs:8:
Ambiguous type variable(s) `a'
in the constraint `PrelGHC.CReturnable a'
arising from the result of the _ccall_ to `f' at ./cc004.hs:8
in the constraint `GHC.Prim.CReturnable a'
arising from the result of the _ccall_ to `f' at cc004.hs:8
In the first argument of `thenADR', namely `_ccall_ f'
In the definition of `foo':
(_ccall_ f) `thenADR` (\ a -> return (a + 1))
./cc004.hs:8:
cc004.hs:8:
Ambiguous type variable(s) `a' in the constraint `Num a'
arising from the literal `1' at ./cc004.hs:8
arising from the literal `1' at cc004.hs:8
In the second argument of `(+)', namely `1'
In the first argument of `return', namely `(a + 1)'
./cc004.hs:15:
cc004.hs:15:
Ambiguous type variable(s) `a'
in the constraint `PrelGHC.CReturnable a'
arising from the result of the _ccall_ to `f' at ./cc004.hs:15
in the constraint `GHC.Prim.CReturnable a'
arising from the result of the _ccall_ to `f' at cc004.hs:15
In the first argument of `thenADR', namely `_ccall_ f'
In the definition of `bar':
(_ccall_ f) `thenADR` (\ a -> return (a + 1))
./cc004.hs:15:
cc004.hs:15:
Ambiguous type variable(s) `a' in the constraint `Num a'
arising from the literal `1' at ./cc004.hs:15
arising from the literal `1' at cc004.hs:15
In the second argument of `(+)', namely `1'
In the first argument of `return', namely `(a + 1)'
......@@ -2,7 +2,7 @@
module ShouldFail where
import PrelGHC
import GHC.Exts
foreign export ccall foo :: Int# -> IO ()
foo i | i ==# 0# = return ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment