summaryrefslogtreecommitdiff
path: root/testsuite/tests/ffi/should_fail/ccfail003.hs
blob: 36ccf968b580889c82cd52cdbaa9e01d9d6677ad (plain)
1
2
3
4
5
6
7
8
9
10
11
{-# LANGUAGE UnliftedFFITypes, MagicHash #-}
-- !!! illegal types in foreign export declarations
module ShouldFail where

import GHC.Exts

foreign export ccall foo :: Int# -> IO ()
foo i | isTrue# (i ==# 0#) = return ()

foreign export ccall bar :: Int -> Int#
bar _ = 42#