summaryrefslogtreecommitdiff
path: root/testsuite/tests/unboxedsums/ffi1.hs
blob: e6128e4ff1cf826b590b55abebc33b7ea5d5e67e (plain)
1
2
3
4
5
6
7
8
9
10
11
{-# LANGUAGE UnboxedSums, UnboxedTuples, MagicHash #-}

module Lib where

import GHC.Prim

-- Can't unboxed tuples and sums to FFI, we should fail appropriately.

foreign import ccall "f1" f1 :: (# Int | Int #) -> IO Int
foreign import ccall "f2" f2 :: (# (# Int, Int #) | (# Float#, Float# #) #) -> IO Int
foreign import ccall "f3" f3 :: (# (# #) | Void# | (# Int# | String #) #) -> IO Int