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

import GHC.Exts

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

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